2

Previous I was getting "'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine." So I executed below 2 steps: 1. Download the file locally You can download the installation here: http://www.microsoft.com/en-us/download/details.aspx?id=13255 Installing using the command prompt with the '/passive' flag. 2.In the command prompt run the following command: 'AccessDatabaseEngine_x64.exe /passive'

Now I am getting-"Exception thrown: 'System.Data.OleDb.OleDbException' in System.Data.dll. Additional information: IErrorInfo.GetDescription failed with E_FAIL(0x80004005)." for below code:

using (OleDbConnection dbConnection = new OleDbConnection(connstring)) { using (OleDbDataAdapter dbAdapter = new OleDbDataAdapter("SELECT * FROM [" + sheet + "]", dbConnection)) { dbAdapter.Fill(table); } } While mouse hover at OleDbConnection dbConnection = new OleDbConnection...., value for server version is displayed as 'dbConnection.ServerVersion' threw an exception of type 'System.InvalidOperationException'

Shruti Shinde
  • 43
  • 1
  • 6

0 Answers0