Subject | Locate method generate a exception when dont find a information |
---|---|
Author | |
Post date | 2017-03-08T17:46:31Z |
Firebird 2.5.6
IBO 5.9.1.2522 Trustware (with my old IBO registred version i dont have this error)
Samples situation
querDados is a IB_QUERY
If not querDados.Locate('NAME', 'MISTER FRIEND', [lopCaseInsensitive, lopPartialKey]) then
MessageBox(0, 'Not find!', 'Warnning', MB_ICONWARNING or MB_OK);
If i have 'MISTER FRIEND' ok no problem, but if i dont have the exception is generate...
Now a days a need change my project to....
try
querDados.Locate('NAME', 'MISTER FRIEND', [lopCaseInsensitive, lopPartialKey]);
except
MessageBox(0, 'Not find!', 'Warnning', MB_ICONWARNING or MB_OK);
above
ERROR MESSAGE
ISC ERROR CODE:335544569
ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, column 23
?
STATEMENT:
(TApplication).formOrcamentos.querDados._locatecursor_querDados
STATEMENT:
(TApplication).formOrcamentos.querDados
SQL MESSAGE
SQL ERROR CODE:-104
SQL ERROR MESSAGE:
Invalid token
SQL
SELECT ORCAMENTOS_VENDAS.PK_ORCS_VENDAS
FROM ORCAMENTOS_VENDAS
where (data between ?/* P00and */ ?/* P01 */)
AND (((UPPER( CLIENTE_NOME ) <= UPPER( ?/* LOC_3 */ ))))
ORDER BY CLIENTE_NOME DESC