Link to home
Start Free TrialLog in
Avatar of RayT
RayTFlag for United States of America

asked on

Microsoft.ACE.OLEDB.12.0 Registration

When I try to run a web application inside the Visual Studio 2017 IDE I get the following error.

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

What's even more interesting.  I don't get this error when I work on a Win App.  Everything works fine.

How do I manually register the component?
Capture.PNG
SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RayT

ASKER

Thanks.  For my understanding.

I have Installed Microsoft Access database engine 2010 (64  bit)
I have set the platform on 2 Dlls that reference the Microsoft Access database engine to x64

For the applications (Win/Web) themselves.  Should the platform be set to x64 also?  

I have other DLLs that DO NOT  reference the Microsoft Access database engine to x64.  
Should the platform be set to x64 also for them?
<<I have Installed Microsoft Access database engine 2010 (64  bit)>>

 That would be the 14.0 provider then.   12.0 is for the Access 2007 database engine.

Jim.
Avatar of RayT

ASKER

Thanks for the correction.
Avatar of RayT

ASKER

I have Installed Microsoft Access database engine 2010 (64  bit) and change my VB.NET code to

        Shared Sub Open(accessDBName As String, Optional password As String = "")
            If password.Length = 0 Then
                activeConnection = New OleDbConnection(String.Format("Provider=Microsoft.ACE.OLEDB.14.0;Data Source={0}; Persist Security Info=False;", accessDBName))

            Else
                activeConnection = New OleDbConnection(String.Format("Provider=Microsoft.ACE.OLEDB.14.0;Data Source={0}; Database Password={1};", accessDBName, password))

            End If

            activeConnection.Open()
        End Sub
Avatar of RayT

ASKER

Now I have one other issue.  In my application I am using the AccessDataSource to make the connection to the Database.  When I initially created the application I used Microsoft.ACE.OLEDB.12.0  to connect to the database.  Now that I am using Microsoft.ACE.OLEDB.14.0 nothing is working.  Is there a quick way to upgrade the AccessDataSource to use Microsoft.ACE.OLEDB.14.0???
Don't know the answer to that one.  

Jim.
Avatar of RayT

ASKER

Thanks
I will add that there is a connection string property somewhere that needs to be updated, but I'm not sure how to get at it.

Jim.
Avatar of RayT

ASKER

Thanks.  I'll do some research.