读书人

Unhandled exception in tstcon32.exe

发布时间: 2013-04-09 16:45:09 作者: rapoo

Unhandled exception in tstcon32.exe (kernel32.dll) :0xe06d7363 sql2000 插入记录时报错
Unhandled exception in tstcon32.exe (kernel32.dll) :0xe06d7363

try
{
m_pRecordset-> AddNew();
m_pRecordset-> PutCollect( "ID", _variant_t(message));
m_pRecordset-> PutCollect( "Date", _variant_t(strDate));
m_pRecordset-> Update();
m_AdoConn.ExitConnect();
}catch(_com_error *e)
{
AfxMessageBox(e->ErrorMessage());
}

在m_pRecordset-> Update(); 报错
Unhandled exception in tstcon32.exe (kernel32.dll) :0xe06d7363

vc??sql2000?? AddNew();? ?0xe06d7363
[解决办法]
加异常捕获看是什么错误

try
{
//你的ADO代码
}
catch (_com_error& e)
{
CString strMsg;
strMsg.Format(_T("错误描述:%s\n错误消息%s"),
(LPCTSTR)e.Description(),
(LPCTSTR)e.ErrorMessage());
AfxMessageBox(strMsg);
}

[解决办法]
用我给的异常捕获代码报什么错。
[解决办法]
ID 在你数据库里是 INT 类型吧?你那个 message 是不是个 'asdf'这种字符串?

读书人网 >VC/MFC

热点推荐