Subject Re: How to reconnect to database
Author gbehnke2000
Hallo Andreas,

in your event handler set

RaiseException = false

Then the the dialog dos'nt appear.

I found the mentionend value (335544721) also per experiments.



-- In, "Andreas Bednarek" <bluehorse@d...>
> Hello everyone!
> Isn't there really anybody, who knows the solution? This must be a
> problem. I also searched the archive but was not succesfull, so
I'll try it
> once again, maybe I'm just missing something simple, but don't know
> Please how can I reconnect to DB (FB1.5 RC7) when the connection
has been
> lost? For example if the cable is disconnected and the connected
> Beacuse the TIBODatabase.Connected property remains True (why?!?),
the only
> way is probably to listen to the exception (I use the IBO Data
> components to connect do DB)
> I implemented an TIBODatabase.OnError event handler, where it looks
> like this:
> if ERRCODE = 335544721 then begin
> Disconnect;
> Connect;
> end;
> This works pretty well EXCEPT that calling Disconnect displays an
> message box 'Dataset is currently fetching' and you have to
> click 'OK' !!! For me It is necessary to avoid that dialog.
> I'm also not sure about the value 335544721 which has been
> empiricaly.
> Do you know how to correctly reconnect to a (remote) FB database
> TIBODatabase?
> thank you very much
> Andreas