[PyQt] Database not showing error

Anil Kumar anilet at gmail.com
Sat Feb 14 13:05:35 GMT 2009

I have few widgets loading its data from a MySQL database.
I create a database connection at the start.
If I leave the application open overnight the connection drops out.

How can I detect if the database connection is still active?.
if db.isOpen():
            logger.debug("DB is valid")

always return valid after the startup, even if network connection is droped.
All the queries return invalid but no exception occurs.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090214/85dad5a1/attachment.html

More information about the PyQt mailing list