大家好,我使用的是ado连接sybase 11数据库,在执行open函数的时候,捕捉到了抛出了第一个异常
错误信息是:error: IDispatch error #3092下面是我的代码,请大家指教,谢谢。 _RecordsetPtr m_pRecordset = NULL;
try
{
m_pRecordset.CreateInstance(__uuidof(Recordset));
m_pRecordset->CursorType = adOpenStatic;
m_pRecordset->CursorLocation = adUseClient;
m_pRecordset->Open(sql,
   m_pConnection.GetInterfacePtr(),
   adOpenKeyset, 
   adLockOptimistic, 
   adCmdText); DbSybaseRes* pRS = new DbSybaseRes(m_pRecordset);
if(NULL !=pRS)
return pRS;
}
catch(_com_error& e)
{
WriteLog("SQL %s error: %s\n", sql, e.ErrorMessage());
return NULL;
}
catch(...)
{
WriteLog("执行打开记录集的SQL语句 %s 出现未知的异常错误。 \n", sql);
return NULL;
} return NULL;