OleDBConnection.Open() Problem

  • Thread starter Thread starter Marcel Hug
  • Start date Start date
M

Marcel Hug

Hello NG !
I would like to open a MS Access Db by C#.
I use the following code:

string strConnectionText = @"Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\SWDev\My_Programs\Controller\DataBase\Test.mdb";
OleDBConnection dbConnection = new OleDBConnection();
dbConnection.ConnectionString = strConnectionText;
dbConnection.Open();

But i allways get a error that I do not have the MDAC 2.6 or later.
But the component checker showns me that i have MDAC 2.8...
Whats wrong ???

Thanks and regards
Marcel Hug
 
Hi,

The code is fine , so you may have a problem with mdac versions you have
installed , have you tried the program in another computer?

what about if you reinstall mdac?

these errors are a pain :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top