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

wyx100 2013-03-05 10:49:30
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

...全文
183 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
wyx100 2013-03-06
  • 打赏
  • 举报
回复
ID 在你数据库里是 INT 类型吧?你那个 message 是不是个 'asdf'这种字符串? 是的
wyx100 2013-03-06
  • 打赏
  • 举报
回复
用我给的异常捕获代码报什么错。 捕获不到,在在m_pRecordset-> Update(); 弹出对话框,运行不了。
LiuYinChina 2013-03-06
  • 打赏
  • 举报
回复
ID 在你数据库里是 INT 类型吧?你那个 message 是不是个 'asdf'这种字符串?
zyq5945 2013-03-05
  • 打赏
  • 举报
回复
加异常捕获看是什么错误
try
{
//你的ADO代码
}
catch (_com_error& e)
{
CString strMsg;
strMsg.Format(_T("错误描述:%s\n错误消息%s"), 
		(LPCTSTR)e.Description(),
		(LPCTSTR)e.ErrorMessage());
AfxMessageBox(strMsg);
}
zyq5945 2013-03-05
  • 打赏
  • 举报
回复
用我给的异常捕获代码报什么错。
wyx100 2013-03-05
  • 打赏
  • 举报
回复
7C812AFB pop esi
wyx100 2013-03-05
  • 打赏
  • 举报
回复
在m_pRecordset-> Update(); 直接跳出对话框报错
wyx100 2013-03-05
  • 打赏
  • 举报
回复
error C2228: left of '.Description' must have class/struct/union type

4,011

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 数据库
社区管理员
  • 数据库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧