_variant_t var;
int a=123456;
var=(long)a;
m_pRecordset->PutCollect("SATID",_variant_t("jianbing"));
m_pRecordset->PutCollect("GSID",_variant_t("asdf"));
m_pRecordset->PutCollect("START",var);
m_pRecordset->Update();
执行到update出错,未指定的错误
若此处按 F11单步执行
inline HRESULT Recordset15::Update ( const _variant_t & Fields, const _variant_t & Values ) {
HRESULT _hr = raw_Update(Fields, Values);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));(*)
return _hr;
}在(*)处出错 hr为负
这是什么错误 为什么数据不能更新另外,如果没有m_pRecordset->PutCollect("START",var);这句,即不插入数据,则更新是可以的,即可以把字符写进数据库,但有了数字就不行了,请达人指教。。这个问题缠绕很久很久了
int a=123456;
var=(long)a;
m_pRecordset->PutCollect("SATID",_variant_t("jianbing"));
m_pRecordset->PutCollect("GSID",_variant_t("asdf"));
m_pRecordset->PutCollect("START",var);
m_pRecordset->Update();
执行到update出错,未指定的错误
若此处按 F11单步执行
inline HRESULT Recordset15::Update ( const _variant_t & Fields, const _variant_t & Values ) {
HRESULT _hr = raw_Update(Fields, Values);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));(*)
return _hr;
}在(*)处出错 hr为负
这是什么错误 为什么数据不能更新另外,如果没有m_pRecordset->PutCollect("START",var);这句,即不插入数据,则更新是可以的,即可以把字符写进数据库,但有了数字就不行了,请达人指教。。这个问题缠绕很久很久了
{
}
catch(_com_error &e)
{
ASSERT(FALSE);
CString str;
str.Format("执行SQL语句失败 错误原因 %s" , (LPCSTR)e.Description());
TRACE(str);
AfxMessageBox(str);
exit(1);
}