On Apr 25, 2006, at 12:24 AM, William Dode wrote: > On 24-04-2006, Dieter Maurer wrote: >> William Dode wrote at 2006-4-22 18:53 +0000: >>> I search for a generic way (for psycopg, mysqldb, adodbapi) to >>> know that the connexion is closed >> >> I fear there is no generic way.... >> > > ok... so, perhaps a solution for postgresql with psycopg ?
How about trying a statement that doesn't do anything, and if it fails with an exception, then it was closed? :) -- ("`-/")_.-'"``-._ Chris Cogdon <[EMAIL PROTECTED]> . . `; -._ )-;-,_`) (v_,)' _ )`-.\ ``-' _.- _..-_/ / ((.' ((,.-' ((,/ fL _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig