Does MyODBC support SQL_ATTR_CONNECTION_DEAD?
am 06.09.2005 09:44:36 von Gu LeiHello:
This is my source code:
bool DBConnection::isDead()
{
SQLINTEGER stringLengthPtr;
SQLINTEGER attr;
SQLRETURN
rc=SQLGetConnectAttr(hdbc,SQL_ATTR_CONNECTION_DEAD,&attr,siz eof(attr),&stringLengthPtr);
if(rc<0)
{
cerr<<"Source File : "<<__FILE__<
}
else if(attr == SQL_CD_TRUE) return true;
else return false;
}
attr always is 0 even when database is stopped.
I need an ODBC function to detect status of database connection.
Is there anything wrong in my code?
Regards,
Gu Lei
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org