Simplest way to get ADO.NET conection string for mdb database

I'm learning ADO.NET and have been stuck for DAYS trying to get a connection string for a plain, vanilla .mdb database. I've been trying potential connection strings and permutations from this site but NOTHING works; the database connection is never opened.

The ODBC Data Source Administrator lists the driver as: "Driver do Microsoft Access (*.mdb)". Another application can successfully open this database, so I know my system is capable of it.

Can anyone suggest a SIMPLE connection string that will work?

edit delete
are you sure?
asked Anonymous user

1 answer

The Solution:

Connection String:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=path to database.mdb; or Provider=Microsoft.ACE.OLEDB.12.0;Data Source=path to database.mdb;


string connString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\ps\Data\Database File\xtreme.mdb;"; 
OleDbConnection myConn = new OleDbConnection(connString); 
edit delete
are you sure?
answered Anonymous user

Post an answer but please log in first

Post Answer
  1. Please log in to post answer

Similar Questions

Tagsfor this question

Forumall questions