I'm trying to deploy a simple PowerBuilder app using a SQL Anywhere 11 database and the SQLA run-time engine. I have all of the SQLA DLLs deployed that are documented and I can start the database engine when I create an ODBC entry. However, I get a syntax error on a simple select.
Of course, running on my development machine does not product this error. Any ideas what's going on? Am I missing a DLL? I've tried the syntax both with quotes and without quotes.
Okay, this is all my fault. I failed to deploy PowerBuilder's PBODB115.ini file. Once I put that in place, everything started working. Ugh. I'm sorry. I wish the error messages, though, were a little more helpful.
answered 17 Feb '10, 15:48
Jason 'Bug' ...
OPTIONS is a reserved word, so when you use it in a SQL statement, it must be double-quoted. For example, issuing this statement:
SELECT * FROM OPTIONS;
will return the syntax error you saw. But if you use this one:
SELECT * FROM "options";
then you get the desired result set.
As an aside, I'd recommend that you do not use reserved keywords as identifiers. You can get a full list of these keywords here: http://dcx.sybase.com/1101en/dbreference_en11/alhakeywords.html.