vc与oracle连接的问题
我用ADO连接的oracle,为了调试代码我新建了一个控制台的应用程序,简单了写了一下连接过程的代码,结果编译的时候一直报错,在vs2005上编译就没有问题但是在vc++...
我用ADO连接的oracle,为了调试代码我新建了一个控制台的应用程序,简单了写了一下连接过程的代码,结果编译的时候一直报错,在vs2005上编译就没有问题但是在vc++上编译不通过。我的代码如下:
#include <iostream>
using namespace std;
#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","rsEOF")
void main()
{
::CoInitialize(NULL);
_ConnectionPtr m_pConn;
m_pConn.CreateInstance("ADODB.Connection");
m_pConn->ConnectionString="Provider=OraOLEDB.Oracle;UserID=system;Password=sa;Data Source=ORCL";
m_pConn->Open("","system","sa",adConnectUnspecified);
m_pConn->Close();
m_pConn.Release();
CoUninitialize();
}
错误:
e:\vc98\include\comutil.h(101) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
执行 cl.exe 时出错.
希望哪位高手帮忙解决一下啊。。!我已经对这个问题郁闷很长时间了 展开
#include <iostream>
using namespace std;
#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","rsEOF")
void main()
{
::CoInitialize(NULL);
_ConnectionPtr m_pConn;
m_pConn.CreateInstance("ADODB.Connection");
m_pConn->ConnectionString="Provider=OraOLEDB.Oracle;UserID=system;Password=sa;Data Source=ORCL";
m_pConn->Open("","system","sa",adConnectUnspecified);
m_pConn->Close();
m_pConn.Release();
CoUninitialize();
}
错误:
e:\vc98\include\comutil.h(101) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
执行 cl.exe 时出错.
希望哪位高手帮忙解决一下啊。。!我已经对这个问题郁闷很长时间了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询