Subject Re: [IBO] restoring a lost connection?
Author Jason Wharton
I'd like to discourage doing this.
Reason is, you are part way through with a database operation and you really
should not immediately force it disconnected.

What you should do is set a flag here and then have it responded to in
either the AppIdle event or if it is something like a service application
have the service loop check this flag and do the disconnection for you. That
way there is no callstack to interrupt.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

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


----- Original Message -----
From: "Arno Garrels" <arno.garrels@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, January 06, 2003 9:03 AM
Subject: Re: [IBO] restoring a lost connection?


> Hi Christian,
>
> Something like this works for me:
>
> if E is EIBO_ISCError then
> with E as EIBO_ISCError do
> if ConnectionLostErrcode( ERRCODE ) then
> begin
> dmMain.DatabaseX.ForceDisconnect; file://silent on error
> ...
> end;
>
> Arno Garrels
>
>
>
> ----- Original Message -----
> From: <c_pradelli@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Friday, January 03, 2003 2:00 PM
> Subject: [IBO] restoring a lost connection?
>
>
> > Hi!
> >
> > I was testing IBO to see if I can reconnect to a database when I lost
> > connection.
> > I read a FAQ in IBO web page about this but I can't do it work. When I
> > detect the lost of the connection I try to close the database but it
> > raise
> > an error:
> >
> > "This is a potential problem: 335544741"
> >
> > and there is no way to reconect.
> >
> > Am I doing something wrong?
> >
> > best regards
> > Christian