sql.Format(_T("select ID,EndTime from TDigSchedule where StartTime<'"+m_stime+"' and EndTime>'"+m_stime+"'"));
sCommand=sql;
rs=pConn->Execute(sCommand,&val,0);
运行到第三句,弹出对话框说,unhandle exception
不知道是什么原因
sCommand=sql;
rs=pConn->Execute(sCommand,&val,0);
运行到第三句,弹出对话框说,unhandle exception
不知道是什么原因
这句话可以在sql里面正常运行
sCommand=sql;
rs=pConn->Execute(sCommand,&val,0);是rs=pConn->Execute(sCommand,&val,0);这个地方的问题吗?那你的pConn是不是有问题看看
try{
rs=pConn->Execute(sCommand,&val,0);
}
catch(_com_error& e)
{
MessageBox(e.ErrorMessage());
NessageBox(e.Description());
}
楼上的楼上,我在看看,在回答你
{
try{
//all your code, including function call
}
catch(_com_error& e)
{
MessageBox(e.ErrorMessage());
NessageBox(e.Description());
}
catch(...)
{
::MessageBox(NULL, "error");
}
}