Page 1 of 1

Problem with integer overflow Delphi XE 10.4 - Firebird 3.0

Posted: 05.10.2021, 19:39
by rogerio
Hey guys.

I use the Zeos component in Delphi for many years and as soon as the XE versions were released I continued with the Zeos component very successfully.

I currently use:

Delphi 10.4 Community

Firebird 3.0 Database

ZEOS version 7.2.14-release

The problem that is occurring is that when executing a SELECT by the Zeos component, it is returning an Integer OverFlow error.

What puzzles me the most is that it never happened. I opened a project in production just to make some implementations and compile without any problem. This error only occurs when opening the ZQuery component with the SELECT result.

I'm doing it as follows:

with ZQuery1 from begin
Close;
Sql.Clear;
Sql.Add('SELECT * FROM CadClientes');
Sql.Add('WHERE');
Sql.Add('CustomerCod = :Par0');
Params[0].AsInteger := ZQuery2.FieldByName('NumeroCli').AsInteger;
Open; <<<-- Error occurs when you get here
end;

As I said above, it always worked this way and when entering OPEN, returns Integer Overflow.

I did the same SELECT using the FireDAC component and it worked perfectly.

Remember that I had already opened the same project in the same Delphi days ago and everything worked perfectly.

Would you like to know what has changed in a few days now that I can't run the system without giving the mentioned error?

Thanks,

Rogerio.

Re: Problem with integer overflow Delphi XE 10.4 - Firebird 3.0

Posted: 06.10.2021, 07:26
by marsupilami
Hello rogerio,

welcome to the forums ;)

Unfortunately i don't get the same error you get. Could you try to strip down your code to a minimum working example that exhibits the problem? Meaning:
- a program that exhibits the problem
- an sql script that constructs the required database and fills it with data

Otherwise it will be nearly impossible for us to find the source of your problem.

Best regards,

Jan

Re: Problem with integer overflow Delphi XE 10.4 - Firebird 3.0

Posted: 09.10.2021, 21:32
by aehimself
Can you please check and post the
- Data type of DB column CadClients.CustomerCod
- Data type of DB column ZQuery2.FieldByName('NumeroCli')
- Actual value of ZQuery2.FieldByName('NumeroCli'), maybe with .AsString