hello, i've a problem with a strek value into a selet statement;
this is the code for slection:
var SQLString = 'SELECT Ragione_sociale as codicefo FROM "Ordini" WHERE Fornitore = +"Fedex";';
is there a problem with code, i don't understnd because it doesn't work.
If i replace strek with a number it works.
var SQLString = 'SELECT Ragione_sociale as codicefo FROM "Ordini" WHERE Fornitore = 12';
Anybody have some suggest about? thanks
Is "Fedex" a variable that contains the number 12? if it is then the statement should be written with the variable outside the quotes, like this:
var SQLString = 'SELECT Ragione_sociale as codicefo FROM "Ordini" WHERE Fornitore = ' + Fedex;
You can see what your string looks like by running the code in the console window. Always do this during code development so you can see what's going on. Here's an article on using the console window:
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/javascript_console/
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script