Problem with integer overflow Delphi XE 10.4 - Firebird 3.0

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
rogerio
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 05.10.2021, 19:19

Problem with integer overflow Delphi XE 10.4 - Firebird 3.0

Post 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.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

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

Post 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
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 796
Joined: 18.11.2018, 17:37
Location: Hungary

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

Post 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
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Post Reply