int CloseDB()
{
int ret;
//db timeout open
SetIdleDBTime(-1);
EXEC SQL ROLLBACK WORK RELEASE;
if ((ret = 0 - abs(sqlca.sqlcode)))
{
ret = GetDBErrCode();
printf("in UnionCloseDB:: EXEC SQL ROLLBACK WORK RELEASE sqlca.sqlcode = [%d]\n",sqlca.sqlcode);
//return(ret);
}
UnionLog("in UnionCloseDB:: close DB OK!\n");
//db timeout close
UnionCloseIdleDBAlrm();
return(0);
}
Note:EXEC SQL ROLLBACK WORK RELEASE----断开与数据库的连接,并释放相关的数据库资源。
阅读(1064) | 评论(0) | 转发(0) |