Zitiere Thomas Jalsovsky <adm...@postel.sk>:
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.