Hi,
I've been looking at the Adobe examples for Database SQL queries that are called within scripts.
The Adobe examples (e.g. http://www.adobe.com/devnet/livecycle/designer_scripting_samples.php or http://www.adobe.com/devnet/livecycle/articles/lc_designer_db_lookup_tip.pdf)
Seem to use the following methods:
- Javascript to populate a multi-item values such as a dropdrown or Combobox
- FormCalc to execute a specific query with parameters.
My question is regarding the specific query ...
Is it best practice to use FormCalc, or is there a similarly usable method with Javascript ... Are there common examples of javascript?
My preference would be to use javascript always (not to mix and match with FormCalc), and to build a SQL query with input variables (e.g. "Select X from Table where TableID = " + inputVal + ";" )
If This is also possible with Javascript, then are there some good examples?
Thanks
So in a way it doesn't matter what language you use. They both have exactly the same capabilities when it comes to accessing the properties and functions of a particular node on a SOM path. However, each has it's own strenghts and weaknesses. Actually, FormCalc is pretty weak all around as a programming language. If you have anything the least bit complex to do program, use JavaScript. It's a much better programming language.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script