首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

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

2013-04-09 
Unhandled exception in tstcon32.exe (kernel32.dll) :0xe06d7363sql2000插入记录时报错Unhandled except

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'这种字符串?

热点排行