Connect Access Database from c# -


i’m trying open access database.

oledbconnection conn = null; oledbdatareader reader = null;   conn = new oledbconnection(     "provider=microsoft.ace.oledb.12.0; " +     "data source=" + @"c:\test.accdb"); conn.open(); 

but on conn.open, i’m getting exception - unrecognized database format "c:\test.accdb"

im’ created db access 2010. so, i’m tried access db using this: http://www.microsoft.com/en-us/download/details.aspx?id=13255 i’m exception „microsoft.ace.oledb.12.0' provider not registered on local machine.” i’m trying this: http://www.microsoft.com/en-us/download/details.aspx?id=23734 , getting unrecognized database format exception.

try this

oledbconnection con = new oledbconnection(@"provider=microsoft.ace.oledb.12.0;data source=c:\test.accdb"); 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -