locked
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. RRS feed

  • Question

  • User-943378660 posted

    Server Error in '/' Application.

    The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

    Source Error:

    Line 485:                OleDbDataAdapter mydata = new OleDbDataAdapter("select * from [Sheet1$]", strconn);
    Line 486:                mydata.TableMappings.Add("Table", "ExcelTest");
    Line 487:                mydata.Fill(ds);
    Line 488:                
    Line 489:                StringBuilder strb = new StringBuilder();

    Source File: c:\inetpub\vhosts\smswonders.co.in\httpdocs\Users\Quick SMS.aspx.cs    Line: 487

    Stack Trace:

    [InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.]
       System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) +975886
       System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +118
       System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +53
       System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.OleDb.OleDbConnection.Open() +37
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
       Quick_SMS.btnSubmit_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\smswonders.co.in\httpdocs\Users\Quick SMS.aspx.cs:487
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

     

    strconn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0";

    This   connection  I used.

    plz help me.

    thank you.<!-- [InvalidOperationException]: The 'Microsoft.ACE.OLEDB.12.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.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at Quick_SMS.btnSubmit_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\smswonders.co.in\httpdocs\Users\Quick SMS.aspx.cs:line 487 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.users_quick_sms_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9b090551\3432e80b\App_Web_kzzjo4gs.14.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->

    Friday, November 14, 2008 4:32 AM

Answers

  • User1716267170 posted

    Hi vishal.kedar,

    The driver is valid when you've installed Microsoft Office 2007. So please check whether it has been installed first. If you haven't installed Microsoft Office 2007, you can try to save the database down to version 2003 and use Jet.OleDb.4.0 provider - assume you've installed Microsoft Office 2003.

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 18, 2008 10:10 PM

All replies

  • User1716267170 posted

    Hi vishal.kedar,

    The driver is valid when you've installed Microsoft Office 2007. So please check whether it has been installed first. If you haven't installed Microsoft Office 2007, you can try to save the database down to version 2003 and use Jet.OleDb.4.0 provider - assume you've installed Microsoft Office 2003.

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 18, 2008 10:10 PM
  • User850243275 posted

    Hi Wencui,

    I had same problem on Office Access 2007. It can work on VS2008 . but fault on IIS7(vista) . I don't know why it is.

    Thanks.

    Saturday, October 24, 2009 12:13 AM
  • User-1057186100 posted

    I think you work under 64 bit OS.

    Please change target platform before compilation to "x86" instead of "Any CPU"

    in Visual Studio 2008, just go to menu ...

    Build -> Configuration Manager -> Active Solution Platform: -> New -> Type or select the new platform -> x86 - > OK

    Good luck.

    Kayun Smile

     

    Friday, January 8, 2010 2:57 AM
  • User-478048850 posted

    Hi

    I have website which will use  OleDB.12.0 to read data from excelsheet.

    But when hosted in production server it shows , "microsoft.ace.oledb.12.0 is not registered on the local mechine"

    How can I correct this. FYI: in production server there is no MS Office. (Company policy does not allow to install MS office)

    Please help

     

    Regards

    Kishor B

    Tuesday, August 17, 2010 1:55 AM
  • User-1631131750 posted

    You need to change Compile configuration to x86, then Its Working.


    Sunday, October 17, 2010 12:58 AM
  • User-1598735341 posted

    I went through this only the other day and wrote a post about it here http://www.arboundy.com/2010/11/the-microsoft.ace.oledb.12.0-provider-is-not-registered-on-the-local-machine/ - hope it helps!

    Monday, November 8, 2010 4:25 AM
  • User1357396882 posted

    Hi

    I am using 2010 Excel and 2003 Server which is 64 bit.

    I am getting same error(first they had installed VS2008 then installed MS Office 2010). I tried to compile in X86  mode as well as install the following drives but no success.

    AcceessDataBaseEngine.exe

    AccessRuntime.exe

    My error as same above "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine".

     

    here is my string and calling VB.Net 2008:

    MyConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; " & "data source='" & PrmPathExcelFile & " '; " & "Extended Properties='Excel 12.0 Xml;HDR=YES';")


    '***I just try this also***            'MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Password="""";User ID=Admin;Data Source=" & PrmPathExcelFile & ";Mode=Share Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:Engine Type=37")

     

    If anybody has any Idea, I appreciate your help.

    Thanks,

    KP

    Tuesday, November 16, 2010 12:44 PM
  • User961513815 posted

    In my case, I had the same issue. I figured out that this package was not installed on the server. Once installed, error went away.

    Package: Microsoft office Access database engine 2007

    You can download this package from Microsoft site

    http://www.microsoft.com/downloads/en/details.aspx?familyid=7554f536-8c28-4598-9b72-ef94e038c891

    Hope it helps.

    Thursday, May 26, 2011 6:06 PM