Page 1 of 1

Firebird: after upgrade from 6.3.14 to 6.4.15 don't find a record that exists.

Posted: Fri 04 Nov 2016 08:40
by Giovanna
Hi,
After upgrade from 6.3.14 to 6.4.15 with the same SQL instruction and same database Firebird the
record that exists is not found with TUniQuery component. The code is:

With UniQ_BfSca do
begin
Close;
Prepare;
SQL.Clear;
SQL.Add('SELECT * FROM BFSCA');
SQL.Add('WHERE OTTIPO=:qOTTIPO');
SQL.Add('AND OTANNO=:qOTANNO');
SQL.Add('AND OTNORD=:qOTNORD');
SQL.Add('AND OTNRIG=:qOTNRIG');
SQL.Add('ORDER BY OTTIPO, OTANNO, OTNORD, OTNRIG');
ParamByName('qOTTIPO').AsString := UpperCase(pOTTIPO);
ParamByName('qOTANNO').AsString := UpperCase(pOTANNO);
ParamByName('qOTNORD').AsInteger := pOTNORD;
ParamByName('qOTNRIG').AsInteger := pOTNRIG;
Open;
If RecordCount > 0 then Trova_BfScaR := True;
end;

Why?

Best regards
Giovanna Cellitti.

Re: Firebird: after upgrade from 6.3.14 to 6.4.15 don't find a record that exists.

Posted: Fri 04 Nov 2016 13:28
by ViktorV
Unfortunately, we could not reproduce the issue.
In order to get a detailed answer, please compose a small sample demonstrating the described behavior and send it using the contact form https://www.devart.com/company/contactform.html including scripts for creating database objects. Also please specify the Firebird version you are using.

Re: Firebird: after upgrade from 6.3.14 to 6.4.15 don't find a record that exists.

Posted: Wed 09 Nov 2016 12:52
by ViktorV
Thank you for the information. We have reproduced the issue and investigation is in progress. We will inform you when we have any results.
As a workaround, you can set the option UniConnection.SpecificOptions.Values['UseUnicode'] to True or set the property TUiQuery.Options.AutoPrepare to False, or set parameters values, using the method AsAnsiString.