Subject | TIBOQuery, Locate, Order By |
---|---|
Author | asbjorn_fridberg |
Post date | 2005-07-06T12:26:18Z |
Using a TIBOQuery (IBO Version 4.5.Ai, Delphi 7) I am experiencing
the following problem:
When the querys' SQL includes an 'ORDER BY' statement, I get an
error when trying to Locate a record in the query, with the Locate
(const KeyFields: string; const KeyValues: Variant; Options:
TLocateOptions) function.
I get the following error: '....Dynamic SQL Error SQL error code = -
104 Token unknown - line 3 char 18 WHERE....' However, there is
no 'where' in my sql statement, and the problem disappears if I
erase the 'ORDER BY' clause from the querys' sql. I have worked
around
this by dynamically changing the sql before doing a locate, and then
changing it back again, but I would appreciate if anyone has a
suggestion as to what the problem is, and/or how to solve it.
Thanks in advance
Asbjørn Fridberg
SSV Aps
the following problem:
When the querys' SQL includes an 'ORDER BY' statement, I get an
error when trying to Locate a record in the query, with the Locate
(const KeyFields: string; const KeyValues: Variant; Options:
TLocateOptions) function.
I get the following error: '....Dynamic SQL Error SQL error code = -
104 Token unknown - line 3 char 18 WHERE....' However, there is
no 'where' in my sql statement, and the problem disappears if I
erase the 'ORDER BY' clause from the querys' sql. I have worked
around
this by dynamically changing the sql before doing a locate, and then
changing it back again, but I would appreciate if anyone has a
suggestion as to what the problem is, and/or how to solve it.
Thanks in advance
Asbjørn Fridberg
SSV Aps