[DB-SIG] ping method for connection objects
Tue, 08 Oct 2002 22:45:33 +0200
Michael C. Neel wrote:
> Just a request for the spec, is that a ping method be added to the
> connection object to test if the db handle is still valid, not unlike
> perl's DBI interface. Ideally a reconnect method would be handy as
I'm not sure whether such a feature is available on a broad
enough basis, e.g. ODBC only recently added such a feature
to the spec and it's not available in all drivers.
Maybe we just need a portable way to test the connection,
e.g. a dummy SQL statement ?
connection.cursor().execute('select x from nonexistingtable')
> Otherwise, I find the spec very complete!
Same here :-)
CEO eGenix.com Software GmbH
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/