现在是用VC操作Access数据库,m_pRecordset代表_RecordsetPtr;id,name,sex为CString型;现在的问题是如果这三个变量中有空值就会抛异常,怎么在异常处理中得知是哪句抛的异常??
               try{
m_pRecordset->AddNew();

m_pRecordset->PutCollect("bianhao",_variant_t(id));
m_pRecordset->PutCollect("mingcheng",_variant_t(name));
m_pRecordset->PutCollect("sex",_variant_t(sex));

                        m_pRecordset->Update();

}
catch (_com_error &e) {

HRESULT hr=e.Error();
CString eStr;
eStr.Format("The Error Code:%08lx ,The Error Message:%s,The source:%s,The Desp:%ld",hr,e.ErrorMessage(),(LPCTSTR)e.Source(),e.Description());
AfxMessageBox(eStr);
return false;
}