I am baffled as to why this is being thrown as I feel like that is what the line I set the connection in and the line I open the connection do....
string filePath = "C:\\Database\\Masterdatabase\\DB1.mdb"; System.Data.OleDb.OleDbConnection oledbconn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet. OLEDB.4.0;Data Source=" + filePath); Oledbconn.Open(); OleDbCommand olecomm = new OleDbCommand("Select * from tbl_information, oledbconn");
System.Data.OleDb.OleDbDataReader dr = null;
//It hits here and error thrown
try { dr = olecomm.ExecuteReader(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); };