none
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine? RRS feed

  • Question

  •  

    Dear,

    I developed a .net application which is connected to an access 2003 db.

    When I am trying to run it on a pc having .net framework 3.5, this error appears, How can I solve it?

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
       at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
       at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
       at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.OleDb.OleDbConnection.Open()
       at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
       at FinancialPlanningUI.DBDataSetTableAdapters.AccountsTableAdapter.Fill(AccountsDataTable dataTable) in C:\Users\Abu Ali\Desktop\FinancialPlanningUIV2\FinancialPlanningUI\DBDataSet.Designer.cs:line 7779
       at FinancialPlanningUI.MainForm.MainForm_Load(Object sender, EventArgs e) in C:\Users\Abu Ali\Desktop\FinancialPlanningUIV2\FinancialPlanningUI\MainForm.cs:line 71
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Monday, March 10, 2008 9:29 PM

Answers

  • Couple of things to mention:

     

    1) Microsoft Access does not need to be installed. You can install the (ACE) database components separately:

     

    http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

     

    2) You can run a 32-bit .NET app which uses an Access database in a 64-bit versions of the OS, but there currently is no 64-bit driver/provider available. So, compiling to 64-bit is not an option in this scenario.

     

    If this is a 32-bit app and you're working with an Access 2007 database then use the ACE provider as mentioned by Rob.

    Wednesday, March 12, 2008 12:09 PM
  • Ok. Access 2007s data access engine is Microsoft.ACE.OLEDB.12.0 so an example connection string would be...

     

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;
     
    Hope that helps.
    Wednesday, March 12, 2008 8:32 AM

All replies

  • Can we have a look at the actual code?

    Tuesday, March 11, 2008 10:19 AM
  • Dear,

    The code is working perfectly, and it runs very well on my pc. but when I deploy the software to another computer who dont have Access 2003 installed, this error appears. Comon experts.

    Tuesday, March 11, 2008 11:19 AM
  • You've answered your own question. If the computer your trying to run it on doesn't have Access 2003 and you're trying to run an application which uses it, then your application isn't going to work. If needs the Jet engine that runs from Access 97 upwards (part of MDAC).

     

    Tuesday, March 11, 2008 2:54 PM
  • Dear,

    Theire is Microsoft Office 2007 Installed in the machine.

    However, Does theirs is a seperate installation of the 'Microsoft.Jet.OLEDB.4.0' to allow running DB based prorams on systems without installing Access on it?

    Note: The OS in the targeted machine is 64 bit.
    Tuesday, March 11, 2008 5:56 PM
  • Ok. Access 2007s data access engine is Microsoft.ACE.OLEDB.12.0 so an example connection string would be...

     

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;
     
    Hope that helps.
    Wednesday, March 12, 2008 8:32 AM
  • Couple of things to mention:

     

    1) Microsoft Access does not need to be installed. You can install the (ACE) database components separately:

     

    http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

     

    2) You can run a 32-bit .NET app which uses an Access database in a 64-bit versions of the OS, but there currently is no 64-bit driver/provider available. So, compiling to 64-bit is not an option in this scenario.

     

    If this is a 32-bit app and you're working with an Access 2007 database then use the ACE provider as mentioned by Rob.

    Wednesday, March 12, 2008 12:09 PM
  • I was receiving this same error and what fixed it for me was this.

    My development environment is Windows 7 Enterprise 64 bit. My target platform is Windows XP Pro 32 bit.

    Under the Project Properties I had to change the Platform target under the Build tab to x86.

    Wednesday, December 1, 2010 6:03 PM
  • Wow, a 10 pointer with the spot on answer, good job Chris.  I'm on a 64 bit Win7 machine and Project\properties\compile\advanced options was set to Any CPU, changed it to x86 and the problem went away.  So why didn't it work on Any CPU?

    Thanks Chris


    Nitromuse

    Tuesday, May 1, 2012 6:57 PM