#include "stdafx.h"
#import "C:/Program Files/Common Files/System/ado/msado15.dll" no_namespace rename("EOF", "EndOfFile")
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
::CoInitialize(NULL);
_ConnectionPtr m_pConnection ;
HRESULT hr;
hr=m_pConnection.CreateInstance(__uuidof(Connection)) ;
try
{
m_pConnection->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C://AnluxDB.mdb", "", "", adModeUnknown);
}
catch(_com_error e )
{
MessageBox(NULL,e.ErrorMessage(),"Error",MB_OK);
return FALSE ;
}
::CoUninitialize();
return TRUE;
}