Page 1 of 1

EIntOverflow in TZAbstractPostgreSQLPreparedStatementV3.PGExecute.ExecEmulated

Posted: 23.06.2022, 12:35
by zMotoR
Hello. When I try to open a PostgreSQL's function with a single parameter via TZStoredProc I get the exception: First chance exception at $00007FFC6683FA7C. Exception class EIntOverflow with message 'Integer overflow'. Process PostGreSQLTest_Project1.exe (6796) in TZAbstractPostgreSQLPreparedStatementV3.PGExecute.ExecEmulated. It happens because ExecEmulated function tries to insert values of out parameters to SQLWriter. In fact there is only one parameter that has to be use in the SQL-query.

There is the value of FSQL variable:

Code: Select all

'SELECT * FROM f_test_4(?)'
There is the line with error:

Code: Select all

SQLWriter.AddText((P+LastPos), QMarkBindValue.QMarkPosition - LastPos, TmpSQL);

Re: EIntOverflow in TZAbstractPostgreSQLPreparedStatementV3.PGExecute.ExecEmulated

Posted: 30.06.2022, 10:01
by marsupilami
Hello zMotoR,

I tried to recreate your problem here but I can't. Could you please publish a small test case (stored procedure code and small program) that trigger the problem?
Also: Which Version of Delphi / FPC do you use? Do you compile for 32 or 64 Bits?

Best regards,

Jan