Subject | Problems with TIB_Query with Parameters |
---|---|
Author | dp075 |
Post date | 2003-08-25T15:48:51Z |
Hello,
I have two parametrized queries (TIB_Query components), one is
UPDATE, and the other is SELECT.
First one works perfectly:
UPDATE
TABLE1
SET
FIELD1 = :FIELD1
WHERE
FIELD2 = :FIELD2
However, the other one fails:
SELECT
*
FROM
TABLE2
WHERE
(FIELD3 like :FIELD3)
ORDER BY
FIELD4
It gives an error message like "character at Row 3, Column 6 is
invalid". Also, in some situation the error message is "cannot
cancel current row".
Both queries share exactly the same properties and settings, except
the SQL text shown above.
Using equal sign instead of LIKE (my first guess) doesn't help.
Delphi gives an AV when trying to evaluate the value of ParamByName
('FIELD3') in debug mode.
It looks like something is wrong with the parameter(s) in the second
query, but don't know what.
Am I missing something? What is wrong here?
Thank you,
DP
I have two parametrized queries (TIB_Query components), one is
UPDATE, and the other is SELECT.
First one works perfectly:
UPDATE
TABLE1
SET
FIELD1 = :FIELD1
WHERE
FIELD2 = :FIELD2
However, the other one fails:
SELECT
*
FROM
TABLE2
WHERE
(FIELD3 like :FIELD3)
ORDER BY
FIELD4
It gives an error message like "character at Row 3, Column 6 is
invalid". Also, in some situation the error message is "cannot
cancel current row".
Both queries share exactly the same properties and settings, except
the SQL text shown above.
Using equal sign instead of LIKE (my first guess) doesn't help.
Delphi gives an AV when trying to evaluate the value of ParamByName
('FIELD3') in debug mode.
It looks like something is wrong with the parameter(s) in the second
query, but don't know what.
Am I missing something? What is wrong here?
Thank you,
DP