Page 1 of 1

Problem with delphi 7, zeos 6.6.6 stable & Firbird 2.5 f

Posted: 03.11.2010, 05:49
by m-gun
I have a problem with Delphi 7 and Firebird zeos final version 2.5 dated 4 October, when it will connect and open a table using ZQuery1 an error like the following picture:

Image

Previously, I have long been using Zeos and firebird version I use 2.5 RC3. seek clarification from you all. Thanks

Posted: 08.11.2010, 02:01
by mdaems
Try using the most recent zeoslib 7 snapshots. There protocol FB 2.5 should be available.

http://zeosdownloads.firmos.at/downloads/snapshots/

Mark

Posted: 25.04.2011, 09:38
by jk
is it possible fix this in 6.6.6?
i found that this bug reproduced only when using fbclient.dll v2.5
when i replaced to fbclient.dll v2.1 - (but server still stays 2.5) - all work fine

some code to reproduce:
zconnection1.protocol := 'firebird-2.1';
zconnection1.databasename := 'server:c\db.gdb';
zconnection1.connect;
zquery.sql.text := 'select * from table';
zquery.open;
zquery.sql.text := 'select * from anothertable'; // <--- AV

bug actually is very strange - looks like isc_dsql_free_statement in fbclient.dll v2.5 corrupting memory in some cases, if i change code to:

zquery.sql.text := 'select * from table';
zquery.open;
zquery.close; //<- change
zquery.sql.text := 'select * from anothertable'; // <--- no AV!

than all work fine.

after some debugging i found that:

destructor TZGenericCachedResolver.Destroy;
begin
FMetadata := nil; //<-- here calling isc_dsql_free_statement
FDatabaseMetadata := nil; //<-- here AV

after calling isc_dsql_free_statement object TZGenericCachedResolver - corrupted: Self variable - Innaccesible value, reading any property - AV, but before first line all was fine.

Posted: 27.04.2011, 19:41
by Pitfiend
Even in BDE you need to close a query before you assign a new sql sequence. IMHO you are asking for a feature no one will implement.

Posted: 28.04.2011, 08:35
by jk
Pitfiend, you are mistaken, in BDE(and in ZEOS) there is no need to close query before assigning new sql - query will be closed automatically.