Page 1 of 1

AV's After ZConnection.Reconnect

Posted: 19.02.2021, 15:48
by brunodelmondes
I'm using Delphi 2010 and ZeosLib SVN 7336... I have a combination of ZConnection > ZQuery > DataSource > DBGrid.

ZConnection is connected to a remote Firebird 2.5 database and, after some time, it is normal to be auto disconnected from the database for inactivity... that's ok... when that happens, a tried to use ZConnection.Reconnect and that, apparently, went well... but, when I move the mouse over the DBGrid, an AV Message ocorrurs... I press OK, then another AV pops up... and that behavior keeps until I call ZConnection.Disconnect followed by ZConnection.Connect procedure.

ZQuery was loaded, of course, before that scenario.

When I click Break on Delphi Debugger, that points me to the ZDbcCache.pas Unit at Line 2574

Code: Select all

if FBuffer.Columns[FColumnOffsets[ColumnIndex{$IFNDEF GENERIC_INDEX} - 1{$ENDIF}]] = bIsNotNull then begin

Re: AV's After ZConnection.Reconnect

Posted: 19.02.2021, 20:35
by marsupilami
Hello Bruno,

that sounds like a bug to me. Usually the Query should be closed after disconnecting. Or do you reopen it yourself? Also please use OPen after Disconenct. Reopen seems to be some kind of legacy thing as far as I remember...

Best regards,

Jan