Hello: This is my source code: bool DBConnection::isDead() { SQLINTEGER stringLengthPtr; SQLINTEGER attr; SQLRETURN rc=SQLGetConnectAttr(hdbc,SQL_ATTR_CONNECTION_DEAD,&attr,sizeof(attr),&stringLengthPtr); if(rc<0) { cerr<<"Source File : "<<__FILE__<<endl; cerr<<"Line Number : "<<__LINE__<<endl; cerr<<"SQLGetConnectAttr failed"<<endl; cerr<<getSQLError(SQL_HANDLE_DBC,hdbc); return true; } 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 -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]