Unhandled exception...(KERNEL32.DLL):0xE06D7363.....
----------------------------------------------------
.....
TESTHR(pPhotoRst.CreateInstance(__uuidof(Recordset)));
try
{
pPhotoRst->Open("SpeakerPhoto",_variant_t((IDispatch*)m_DBConnect,TRUE),adOpenKeyset,adLockOptimistic,adCmdTable);
}
catch (_com_error&e)
{
AfxMessageBox(e.ErrorMessage());
return 0;
}
pPhotoRst->AddNew();
pPhotoRst->PutCollect("speaker_id",_variant_t"BEL01"));
pPhotoRst->PutCollect("speaker_photo",_variant_t());
pPhotoRst->Update();
.....
连接成功,别的表能打开,但是也是在插入第一个记录失败,这是什么原因啊?谢谢指点!!!
----------------------------------------------------
.....
TESTHR(pPhotoRst.CreateInstance(__uuidof(Recordset)));
try
{
pPhotoRst->Open("SpeakerPhoto",_variant_t((IDispatch*)m_DBConnect,TRUE),adOpenKeyset,adLockOptimistic,adCmdTable);
}
catch (_com_error&e)
{
AfxMessageBox(e.ErrorMessage());
return 0;
}
pPhotoRst->AddNew();
pPhotoRst->PutCollect("speaker_id",_variant_t"BEL01"));
pPhotoRst->PutCollect("speaker_photo",_variant_t());
pPhotoRst->Update();
.....
连接成功,别的表能打开,但是也是在插入第一个记录失败,这是什么原因啊?谢谢指点!!!
pPhotoRst->PutCollect("speaker_photo",_variant_t()); 是不是第二个字段不能为空啊?或者是还有其他不能为空的字段?
或者是数据类型不匹配?