Lost database connection - Please Help ! 
Author Message
 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



Wed, 18 Jun 1902 08:00:00 GMT  
 Lost database connection - Please Help !
Set connected to false first:
Database.Connected := false;
Database.Connected := true;

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying

No questions via email, unless explicitly invited.



Wed, 18 Jun 1902 08:00:00 GMT  
 Lost database connection - Please Help !

Quote:

>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



Wed, 18 Jun 1902 08:00:00 GMT  
 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

No questions via email, unless explicitly invited.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Interbase: Database connection Lost

2. Losing connection to Interbase database server ?

3. Recover lost Database Connection in Delphi

4. Please HELP - Losing Sanity !

5. Please HELP - Losing Sanity !

6. HELP: sharing database connection (like Delphi and Database Explorer)

7. D3 IB5 Lost connection problem

8. Connection lost to Interbase...

9. ODBC connection to Oracle 8, please help

10. Help : database connection

11. BDE database connections, how to control - HELP!

12. HELP - How to trap database connection faults...

 

 
Powered by phpBB® Forum Software