I've tried that version with an already built app. When it reaches the very first query.open (the user authentication table), a Range Check Error popup.
The procedure which pops the exception is TZSQLDA.InitFields. On my actual working version of zeos (CVS-13/10/2005, some little mods by myself), the procedure stands on line 1333 of ZDbcInterbase6Utils, and has the following code:
Code: Select all
procedure TZSQLDA.InitFields(Parameters: boolean);
var
I: Integer;
SqlVar: PXSQLVAR;
begin
{$RANGECHECKS OFF}
for I := 0 to FXSQLDA.sqld - 1 do
begin
SqlVar := @FXSQLDA.SqlVar[I];
case SqlVar.sqltype and (not 1) of
SQL_BOOLEAN, SQL_TEXT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_DATE,
SQL_BLOB, SQL_ARRAY, SQL_QUAD, SQL_SHORT,
SQL_LONG, SQL_INT64, SQL_DOUBLE, SQL_FLOAT, SQL_D_FLOAT:
begin
if SqlVar.sqllen = 0 then
IbReAlloc(SqlVar.sqldata, 0, 1)
else
IbReAlloc(SqlVar.sqldata, 0, SqlVar.sqllen)
end;
SQL_VARYING:
IbReAlloc(SqlVar.sqldata, 0, SqlVar.sqllen + 2)
end;
if Parameters = True then
begin
//This code used when allocated sqlind parameter for Param SQLDA
SqlVar.sqltype := SqlVar.sqltype or 1;
IbReAlloc(SqlVar.sqlind, 0, SizeOf(Short))
end else begin
//This code used when allocated sqlind parameter for Result SQLDA
if (SqlVar.sqltype and 1) <> 0 then
ReallocMem(SqlVar.sqlind, SizeOf(Short))
else
SqlVar.sqlind := nil;
end;
end;
{$RANGECHECKS ON}
end;
In the new version, it's in the same file, but some lines above (1309), and has the following code:
Code: Select all
procedure TZSQLDA.InitFields(Parameters: boolean);
var
I: Integer;
SqlVar: PXSQLVAR;
begin
{ WAS RC OFF }
for I := 0 to FXSQLDA.sqld - 1 do
begin
SqlVar := @FXSQLDA.SqlVar[I];
case SqlVar.sqltype and (not 1) of
SQL_BOOLEAN, SQL_TEXT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_DATE,
SQL_BLOB, SQL_ARRAY, SQL_QUAD, SQL_SHORT,
SQL_LONG, SQL_INT64, SQL_DOUBLE, SQL_FLOAT, SQL_D_FLOAT:
begin
if SqlVar.sqllen = 0 then
IbReAlloc(SqlVar.sqldata, 0, 1)
else
IbReAlloc(SqlVar.sqldata, 0, SqlVar.sqllen)
end;
SQL_VARYING:
IbReAlloc(SqlVar.sqldata, 0, SqlVar.sqllen + 2)
end;
if Parameters = True then
begin
//This code used when allocated sqlind parameter for Param SQLDA
SqlVar.sqltype := SqlVar.sqltype or 1;
IbReAlloc(SqlVar.sqlind, 0, SizeOf(Short))
end else begin
//This code used when allocated sqlind parameter for Result SQLDA
if (SqlVar.sqltype and 1) <> 0 then
ReallocMem(SqlVar.sqlind, SizeOf(Short))
else
SqlVar.sqlind := nil;
end;
end;
{ WAS RC ON }
end;
Anyone know why it's enabled now? The exactly line which pops the exception is SqlVar := @FXSQLDA.SqlVar;, when the I counter have value 1 (there's a 0 iteration before, and it runs well). Dunno if I can enable it. So I came here
[]'s
EDIT:
I cannot reply in this forum, so, it goes here:
The bug is already Fixed!
But always remember to disable the Debug Version (enabling Release Version) into Zeos.inc.