::EnterCriticalSection(&M_SQL_CLOCK);
sprintf(AStrSQL, "SELECT id,motor_id,type,length,task_id,start_time,stop_time,start_week,stop_week,"
"start_week_time,start_week_time,cycle,msg FROM arm_actuel_message WHERE station = 0 "
"ORDER BY type,motor_id LIMIT %d", MaxCommandSum);if(mysql_query(AMySQL, AStrSQL) != 0)
{
::LeaveCriticalSection(&M_SQL_CLOCK);
return -1;
}程序执行到
mysql_query(AMySQL, AStrSQL)程序就会崩溃,AMySQL是数据库对象。
执行查询不到结果的SQL语句(比如在一个不存在的表中查数据)不出错,执行能查询到结果的SQL语句就会出错,请指教