Page 1 of 1

v2.50.21 ParamByName().AsLargeInt broken

Posted: Sat 20 Mar 2010 01:55
by Wade
Any value greater than MaxInt is truncated, hence AsLargeInt on params fails to return the correct row (select) or stores rubbish (insert, update)

dbexp.pas:

function TCRSQLCommand.setParamDescValue(...): SQLResult;
var
s: string;
sa: AnsiString;
i: integer;
i64: integer;
...

This is the mistake... it should be:

i64: Int64;

otherwise the value is trashed here (about 160 lines later):

dtInt64, dtBcd, dtFMTBcd:
begin
if (dt = dtInt64) and FSQLConnection.FEnableLargeint then begin
i64 := PInt64(pBuffer)^;
ParamDesc.SetValue(i64);
end

Posted: Mon 22 Mar 2010 11:41
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next DbxIda build.

Posted: Wed 24 Mar 2010 18:44
by Wade
Timeframe?

Posted: Thu 25 Mar 2010 13:35
by Dimon
New build of DbxIda version 2.50.22 is available for download now.