[unixODBC-support] Checking connection status with ODBC

Peter Harvey pharvey at peterharvey.org
Tue Jan 13 17:13:21 GMT 2009


Alan J Batsford wrote:
>
> I'm using unixODBC 2.2.14 on CentOS 4.6. Right now I'm using ODBC to
> connect to postgreSQL 8.2.5 within a C/C++ program, but the DSN is
> going to change to Oracle soon. I can make a connection and run
> queries. What's the best way to generically check the connection status?
>
> Thanks for all your advise.
>

You could try using SQLGetConnectAttr with SQL_ATTR_CONNECTION_DEAD.

--
Peter



More information about the unixODBC-support mailing list