Hello,
I am trying to connect to an Access database using C++.
I am using DAO to connect to the database.
In the past, I have been able to successfully connect
to SQL Server, and Oracle. Uhfortunately, I am
unable to connect to an Access databse
I have tried the following:
strDriver = _T("{Microsoft Access Driver (*.mdb)}");
strProvider = _T("Microsoft.Jet.OLEDB.4.0");
strDataSource = _T("C:
\mydatabase.mdb");
pCRDatabaseTables->ConnectionProperties->Add(_T("DRIVER"), variantt(strDriver));
pCRDatabaseTables->ConnectionProperties->Add(_T("Provider"), variantt(strDriver));
pCRDatabaseTables->ConnectionProperties->Add(_T("Data Source"), variantt(strDataSource));
What am I doing wrong?
TIA,
-jc
Edited by: Jacques Cooper on Nov 26, 2009 8:20 AM
Edited by: Jacques Cooper on Nov 26, 2009 8:22 AM
Edited by: Jacques Cooper on Nov 26, 2009 8:27 AM