[DB-SIG] how to know the connexion is closed

Chris Cogdon chris at cogdon.org
Tue Apr 25 09:38:03 CEST 2006


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 <chris at cogdon.org>
     . . `; -._    )-;-,_`)
    (v_,)'  _  )`-.\  ``-'
   _.- _..-_/ / ((.'
((,.-'   ((,/   fL



More information about the DB-SIG mailing list