Thread: Is there a way to check if a db connection handle is still valid?

Is there a way to check if a db connection handle is still valid?

From
Antai Ning
Date:
<p><font size="2">Hi there,</font><p><font size="2">Is there a way to check if a db connection handle is still
availble?My db program need to run forever and I found that if one insertion fails, the handle seems crashed. Then when
thenext insertion using the same handle will kill the whole program.</font><p><font size="2">Thanks in
advance!</font><p><fontsize="2">Andy </font> 

Re: Is there a way to check if a db connection handle is still valid?

From
Thomas Quinot
Date:
You could probably try a query like 'SELECT 1;' and see if it succeeds.

Thomas.

--
    Thomas.Quinot@Cuivre.FR.EU.ORG