Subject | Re: Parser messes up SQL containing FIRST |
---|---|
Author | aleksander_oven |
Post date | 2003-10-14T09:55:36Z |
Helen,
Here it is:
-------------------------8<------------------------
ISC ERROR CODE:335544569
ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, char 6
,
-------------------------8<------------------------
Obviously, the comma is upsetting the db server.
I traced it down to the TIB_Statement.SysExecPrepare method, where the
exception is raised after execution of these two lines:
MakeServerSQL( RefinedSQL, nil, nil, nil, tmpSQL, ParamChar, false,
tmpLen );
errcode := API_Prepare( PChar( tmpSQL ), New_In, New_Out );
At this point both RefinedSQL and tmpSQL variables contain the SQL
string I posted before.
Again, I'm sorry for not being clear the first time. I hope we can
find an answer to this problem.
Kind regards,
Aleksander oven
> It shouldn't fail. It will fail to return any rows if there is noSilly me... I forgot to include the error message I'm getting.
> row with ID = 1. What is the "failure" you are encountering?
Here it is:
-------------------------8<------------------------
ISC ERROR CODE:335544569
ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, char 6
,
-------------------------8<------------------------
Obviously, the comma is upsetting the db server.
I traced it down to the TIB_Statement.SysExecPrepare method, where the
exception is raised after execution of these two lines:
MakeServerSQL( RefinedSQL, nil, nil, nil, tmpSQL, ParamChar, false,
tmpLen );
errcode := API_Prepare( PChar( tmpSQL ), New_In, New_Out );
At this point both RefinedSQL and tmpSQL variables contain the SQL
string I posted before.
Again, I'm sorry for not being clear the first time. I hope we can
find an answer to this problem.
Kind regards,
Aleksander oven