//ADO import
#import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "EndOfFile")
#import <msrdo20.dll> no_namespace rename( "EOF", "_EOF" ) rename("UserNameA", "_UserNameA")
void dbConnect()
{
_ConnectionPtr m_ADOConn;
m_ADOConn = NULL;
m_ADOConn.CreateInstance( __uuidof( Connection ) );
// still null... i dont know why
m_ADOConn->ConnectionString = strCon;
// program crashes on this line ...
m_ADOConn->Provider = "MSDASQL";
m_ADOConn->CursorLocation = adUseClient;
}
can anyone explain to me what I'm doing wrong ? I imported the msado15.dll for _ConnectionPtr ... this is really bugging me, I dont know what to do
#import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "EndOfFile")
#import <msrdo20.dll> no_namespace rename( "EOF", "_EOF" ) rename("UserNameA", "_UserNameA")
void dbConnect()
{
_ConnectionPtr m_ADOConn;
m_ADOConn = NULL;
m_ADOConn.CreateInstance( __uuidof( Connection ) );
// still null... i dont know why
m_ADOConn->ConnectionString = strCon;
// program crashes on this line ...
m_ADOConn->Provider = "MSDASQL";
m_ADOConn->CursorLocation = adUseClient;
}
can anyone explain to me what I'm doing wrong ? I imported the msado15.dll for _ConnectionPtr ... this is really bugging me, I dont know what to do