vc 使用ADO访问ORACLE问题??
我使用ADO访问ORACLE时,无法连接到数据库,且抛出Unknown error 0x800A0E7A异常,请各位赐教_ConnectionPtr m_pConnection;
_CommandPtr m_pCommand;
_RecordsetPtr m_pRecordset;
//定义指针
m_pConnection.CreateInstance (__uuidof(Connection));
m_pRecordset.CreateInstance (__uuidof(Recordset));
m_pCommand.CreateInstance ("ADODB.Command");
try
{
_bstr_t strConnect="Provider=OraOLEDB.Oracle.1;Password=sfis1;User ID=sfis1;Date Source=sfis;Persist Security Info=True";
m_pConnection->Open (strConnect,"","",-1);
// m_pConnection->Open (strConnect,"","",adModUnknown);
}
catch (_com_error e)
{
MessageBox("数据库连接失败!");
AfxMessageBox(e.ErrorMessage ());