List:MySQL and Perl« Previous MessageNext Message »
From:Jochen Wiedmann Date:August 20 2002 12:00pm
Subject:Re: reconnect
View as plain text  
Zitiere Thomas Jalsovsky <admin@stripped>:

> 
> 	Do I need to reconnect if my database goes away and goes back?
> 1. 	db shutdown
> 2. 	some sql queries which fail (error handling)
> 3. 	db back
> 4. 	?reconnect? 
> 4?5.	sql queries

The driver has a certain degree of ability to
reconnect. However, that only works in the absence
of transactions, which you are most probably going
to use.

I would suggest to encapsulate the database handling.
If something goes wrong, assume the database connection
to be dead. Close it and reconnect.


Thread
reconnectThomas Jalsovsky20 Aug
  • Re: reconnectUli B20 Aug
  • Re: reconnectJochen Wiedmann20 Aug