连接oracle10g问题
我将连接9i的程序放到有10g的服务器上连接9i和10g都报错
const _com_error::`vftable' *
我的连接字符串如下:
Provider=OraOLEDB.Oracle;Data Source=ORACLE9;User Id=xxx;Password=xxxxxx
连接函数如下:
if(AfxOleInit())//初始化
{
try
{
hr=m_pConnection.CreateInstance("ADODB.Connection");///创建Connection对象
if(SUCCEEDED(hr))
{
m_pConnection->ConnectionTimeout=3;
m_pConnection->Open(_bstr_t(strConn),"","",-1);
if(m_pConnection->State)
{
return 0;
}
else
{
return -1;
}
}
}
catch(_com_error e)
{
return -1;
}
}