Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
MyTableName="Order Master" ... ... retcode = qExecDirect(hstmt, "SELECT ORDNUM, PRTNUM FROM %MyTableName%")
My script uses ODBC functions to help me access the Order Master file for specific data. It keeps crashing with the error message "37000 [Pervasive][ODBC Client Interface][....]Syntax Error:SELECT ORDNUM, PRTNUM FROM Order<<>> Master"
I used the sample script that came with the ODBC extender. I know it works because it successfully displays the messages that appear before the script that is giving me the above error message.
Other SQL Strings to try:
;retcode = qExecDirect(hstmt, "SELECT SHOPORDERNUM, PARTID FROM [%MyTableName%]") ;retcode = qExecDirect(hstmt, "SELECT SHOPORDERNUM, PARTID FROM '%MyTableName%'") ;retcode = qExecDirect(hstmt, 'SELECT SHOPORDERNUM, PARTID FROM "%MyTableName%"')
retcode = qExecDirect(hstmt, 'SELECT SHOPORDERNUM, PARTID FROM "%MyTableName%"')Table names with spaces in them must be enclosed in double quotes within the query string. Literals, on the other hand, need to be in single quotes (apostrophes).
Article ID: W16342
File Created: 2005:02:18:12:19:56
Last Updated: 2005:02:18:12:19:56