主题:希望高手指点一下,关于ADO的问题
catch(_com_error &e)
{
CString ErrorStr;
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
ErrorStr.Format( "CADODataBase Error\n\tCode = %08lx\n\tCode meaning = %s\n\tSource = %s\n\tDescription = %s\n",
e.Error(), e.ErrorMessage(), (LPCSTR)bstrSource, (LPCSTR)bstrDescription );
m_strLastError = _T("Connection String = " + GetConnectionString() + '\n' + ErrorStr);
m_dwLastError = e.Error();
return FALSE;
}
这中间的e.Error()和e.ErrorMessage()函数的什么意思?
{
CString ErrorStr;
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
ErrorStr.Format( "CADODataBase Error\n\tCode = %08lx\n\tCode meaning = %s\n\tSource = %s\n\tDescription = %s\n",
e.Error(), e.ErrorMessage(), (LPCSTR)bstrSource, (LPCSTR)bstrDescription );
m_strLastError = _T("Connection String = " + GetConnectionString() + '\n' + ErrorStr);
m_dwLastError = e.Error();
return FALSE;
}
这中间的e.Error()和e.ErrorMessage()函数的什么意思?