Connecting to ACCDB format MS-ACCESS database through OLEDB

40,309

Use ACE 4 driver, download it here then use following connection string:

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\marcelo.accdb;Jet OLEDB:Database Password=MyDbPassword;"

Share:
40,309
Marcelo
Author by

Marcelo

Updated on July 23, 2022

Comments

  • Marcelo
    Marcelo almost 2 years

    I've recently made another question about connecting to MS-ACCESS database with .NET in C# or VB.NET. It worked just as intended with MDB, but with accdb it caused an exception in

    conn.Open();
    

    which follows:

    alt text http://dl.dropbox.com/u/3045472/accdb_fail.png

    Is there another way to do this? My original intention (like stated in the original question) is gathering some (actually, a lot of) fields.

  • Andrey
    Andrey about 14 years
    i think yes. or create client-server application with thin clients
  • Marcelo
    Marcelo about 14 years
    Worked with reader.GetValue(3).ToString() Do you know why it didn't with getstring, even though it was a name?
  • Saeid
    Saeid over 11 years
    @Andrey I ask a related Question here: stackoverflow.com/questions/14475968/… , would you please check it