Subject Re: [IBO] Restoring a lost connection?
Author Jason Wharton
Please search the archives on this. There has been much said already.
Real short, do not do anything more than set flags or raise exceptions in
the OnError event.

Regards,
Jason Wharton
CPS - Computer Programming Solutions
Mesa Arizona
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --

----- Original Message -----
From: "micarnal" <zorro@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, March 27, 2003 5:32 PM
Subject: [IBO] Restoring a lost connection?


> Hi, Jason a number of users have been asking how to handle this
> situation safely. Would it be possible to get an example of your
> usual responses:
>
> My current code is:
>
> procedure TDaDataMod.IB_ConnectionError(Sender: TObject;
> const ERRCODE: Integer; ErrorMessage, ErrorCodes: TStringList;
> const SQLCODE: Integer; SQLMessage, SQL: TStringList;
> var RaiseException: Boolean);
> begin
> if not IB_Connection.VerifyConnection then
> begin
> DebugLog('Database Connection is lost.');
> IB_Connection.ForceDisconnect;
> if timmerDatabaseConnect.Enabled = False then
> begin
> IB_Connection.RequestReconnect;
> timmerDatabaseConnect.Enabled := True;
> end;
> RaiseException := False;
> end;
> end;
>
> =========================
> BTW the Database reconnect timmer just calls:
> IB_Connection.RequestReconnect;
>
> >From what I read you said I should do this, could you provide an
> example of how this should be done. Please...
>
> Thanks
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>