Board index » delphi » Lost database connection - Please Help !

Lost database connection - Please Help !

I've written a Delphi 3.0 app that connects to an Oracle7.3 database. The
app works fine until the database is taken offline in the evening for
backup. I have tried re-connecting, i.e. database1.connected :=
True....etc............., and the software thinks it has successfully
re-connected. This is the problem, it hasn't re-connected and I can only get
around this by closing down the app and re-starting.

Is there a way around this without re-starting.

Regards

John

 

Re:Lost database connection - Please Help !


Set connected to false first:
Database.Connected := false;
Database.Connected := true;

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Re:Lost database connection - Please Help !


Quote
Robert Cerny wrote in message <5p6K2.14$oa2.121...@news.siol.net>...
>Set connected to false first:
>Database.Connected := false;
>Database.Connected := true;

>--
>----------------------
>Regards
>Robert Cerny

Hi Robert,
                In my email I was implying exactly what you have stated as a
solution and this does not work. I have even tried destroying the database
object and instantiating a new one, this also fails.

Re-starting the app solves the problem but I would prefer not to do this.
I'm wondering if it is some sort of underlying BDE issue ?

Regards

John

Re:Lost database connection - Please Help !


Quote
>Hi Robert,
>                In my email I was implying exactly what you have stated as
a
>solution and this does not work. I have even tried destroying the database
>object and instantiating a new one, this also fails.

>Re-starting the app solves the problem but I would prefer not to do this.
>I'm wondering if it is some sort of underlying BDE issue ?

>Regards

>John

You wrote that you only set database.connected to true.
Anyway, this works in my apps (with Sybase SQL Anywhere), so I suspect that
something else goes wrong.
1st test: close client and app gets exception "Database engine not running"
2nd test: unplug network and app freezes for a minute then gets the
exception, while client says: "Server XX has gone down"

In both cases simply reconnecting database works.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Other Threads