Subject | Re: [IBO] Locate method generate a exception when dont find a information |
---|---|
Author | Michel LE CLEZIO |
Post date | 2017-03-09T17:09:14Z |
Hello,
Do you have empty string value in NAME ?
With Best regards,
Michel
Le Mercredi 8 mars 2017 18h46, "carlosdaniel_am@... [IBObjects]" <IBObjects@yahoogroups.com> a écrit :
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);
end;
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