下面这段代码,一旦执行到pTD->m_Database.ExecuteSQL(pTD->strSQL);就会报错,是何原因呢?别的地方这样调用就没事。bool CPosServerDlg::executeSQL(ThreadData_Stru *pTD,const char * tbl)
{
char trace[1024];
sprintf(trace,"execute_SQL::SQL is %s,table is %s!\n", pTD->strSQL, tbl);
LOG_PRINTF(trace,pTD);
LOG_PRINTF("execute_SQL begin\n",pTD); pTD->m_RecordSet.m_pDatabase = &pTD->m_Database;
try{
pTD->m_Database.ExecuteSQL(pTD->strSQL);
}
catch(CException){
pTD->m_RecordSet.Close();
LOG_PRINTF("execute_SQL fail!\n",pTD);
strncpy(pTD->datashow.respcode,RESP_84,2);
return false;
}
pTD->m_RecordSet.Close();
LOG_PRINTF("execute_SQL end!\n",pTD);

return true;
}