#include "stdafx.h"
#include "afx.h"
#include "iostream.h"
#include "stdio.h"
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename ("EOF", "adoEOF") 
int main(int argc, char* argv[])
{
HRESULT hr;
if(FAILED(CoInitialize(NULL)))
{
cout<<"Unable to initialize COM"<<endl;
return -1;
}
_ConnectionPtr m_pConnection;
hr=m_pConnection.CreateInstance(__uuidof(Connection)); m_pConnection->ConnectionTimeout = 10;
printf("连接数据准备1\n");
//try{

if (!FAILED(hr=m_pConnection->Open("Provider=OraOLEDB.Oracle.1;UserID=haso;Password=pass;Data Source=hasonxl","haso","pass",adConnectUnspecified)))// HASO-037DVJYZ93
{
printf("连接数据库成功2\n");
}
else
{
return false;
}
return 0;
}运行时出现提示程序非正常结束,
是怎么回事?请大家帮助看看