Subject | Reconnect to DB |
---|---|
Author | abedna2000 |
Post date | 2004-01-05T12:11:40Z |
Hello,
please how can I reconnect do DB (FB1.5 RC7) when the connection has
been lost?
I implemented an TIBODatabase.OnError event, where it looks a bit
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'. It is necessary to avoid that dialog. I'm also not sure
about the value 335544721 which has been discovered empiricaly.
Do you know another way or how to tune my approach to reconnect to a
(remote) FB database?
thanks
Andreas
please how can I reconnect do DB (FB1.5 RC7) when the connection has
been lost?
I implemented an TIBODatabase.OnError event, where it looks a bit
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'. It is necessary to avoid that dialog. I'm also not sure
about the value 335544721 which has been discovered empiricaly.
Do you know another way or how to tune my approach to reconnect to a
(remote) FB database?
thanks
Andreas