Menu

#51 Error on lost connection

open
nobody
Transports (6)
5
2014-08-29
2003-01-23
Anonymous
No

Exported from Bugzilla, issue 3967.

--- Comment added on 9/30/02 8:07:05 AM ---
Milan Hora, 9/25/2002
FF 2.11

Hi,

try this
- start ff server
- start ff explorer
- open any table with ff explorer
- stop server
- on qustion The connection to the server has been lost. Reconnect? reply No
- start server
- close window with open table - I get error message Access violation at
address 00000000. Read of address 00000000.

I do not open any other table with ff explorer. When I close ff explorer, I
get access violation.

In Delphi 5 try this

- create new application
- on form insert component ffTable, DataSource, DBGrid
- set ffTable.DatabaseName and ffTable.TableName
- set DataSource.DataSet to ffTable
- set DBGrid.DataSource to DataSource
- open ffTable, DBGrid show data
- stop ff server
- on qustion The connection to the server has been lost. Reconnect? reply No
- I get Access violation

Milan

--- Comment added on 9/30/02 8:10:05 AM ---
Milan Hora, 9/30/2002
Hi,

when I do this modification to unit ffdb.pas, all works OK (recompiled
explorer works OK, simple delphi project works OK).

procedure TffBaseClient.bcClearDependents;
...

for DSIdx := 0 to Pred(DB.DataSetCount) do begin
DS := DB.DataSets[DSIdx];
// if DS is TffBaseTable then
{!!.06}
// TffBaseTable(DS).btIgnoreDataEvents := True;
{!!.06}
DS.dsProxy.dbliActive := False;
DS.dsProxy.tpServerEngine := nil;
DS.TableState := TblClosed;
DS.dsCursorID := 0;
DS.Close;
if DS is TffBaseTable then
{!!.xx}
TffBaseTable(DS).btIgnoreDataEvents := True;
{!!.xx}
if DS is TffBaseTable then
...

If is property btIgnoreDataEvents set to True before call DS.Close, then if
aEvent is dsUpdateStatus then
FreeRecordBuffer in procedure DataEvent is not call.

procedure TffBaseTable.DataEvent(aEvent: TDataEvent; aInfo: Longint);
begin
if btIgnoreDataEvents then
{!!.06}
Exit;
{!!.06}
if (aEvent = dePropertyChange) then
IndexDefs.Updated := False;

inherited DataEvent(aEvent, aInfo);

if aEvent = deUpdateState then
if State = dsEdit then begin
FreeRecordBuffer(dsOldValuesBuffer);
dsOldValuesBuffer := AllocRecordBuffer;
Move(ActiveBuffer^, dsOldValuesBuffer^, dsRecBufSize);
end else begin
FreeRecordBuffer(dsOldValuesBuffer);
dsOldValuesBuffer := nil;
end;
end;

What do you mean about this?

Milan

Discussion


Log in to post a comment.

MongoDB Logo MongoDB