Subject | Re: [IBO] Re: Unable to complete network request to host 335544721 |
---|---|
Author | Helen Borrie |
Post date | 2006-05-20T15:09:52Z |
At 12:16 AM 21/05/2006, you wrote:
Connect doesn't work while the network cable is unplugged? (Probably not....)
The code looks OK to me, except I'd want to put the Connect call in a
try...except loop, in case the condition that caused the network
connection to break is still there.
Helen
>Helen, thanks a bunch!!!I can't work out what you're saying here. Are you saying that
>
>This looks almost too easy... so I am thinking I am not doing it
>correctly...
>
>Here is my IBODatabase.OnError routine... does this look correct or am
>I forgetting something? I have tested this by yanking out my LAN cable
>and it worked... but that is not exactly the most "scientific" method! :-)
>
>procedure TdmRolodex.dbRolodex2Error(Sender: TObject;
> const ERRCODE: Integer; ErrorMessage, ErrorCodes: TStringList;
> const SQLCODE: Integer; SQLMessage, SQL: TStringList;
> var RaiseException: Boolean);
>begin
> if (ERRCODE=isc_network_error) then
> begin
> if (not dbRolodex2.VerifyConnection) then
> begin
> dbRolodex2.ForceDisconnect;
> dbRolodex2.Connect;
> end;
> end;
>end;
Connect doesn't work while the network cable is unplugged? (Probably not....)
The code looks OK to me, except I'd want to put the Connect call in a
try...except loop, in case the condition that caused the network
connection to break is still there.
Helen