Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having VB6.0 application that uses Provider "microsoft ace oledb 12.0" to connect to MS Access Database (.accdb) 2016 version. Now i need to deploy my VB application in the windows 10 with Office 365 (64 bit) the machine and My VB app is not working, it says "Provider cannot be found. It may not be installed properly".

Below code was used for in the VB app
set gdDB = New ADODB.Connection
gdDB.open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source = "FullPath with DB File Name"

What I have tried:

After getting the above error, I tried changing as like below
gdDB.open "Provider=Microsoft.ACE.OLEDB.16.0;Data Source = "FullPath with DB File Name"

This also not working. I Can see the "ACEOLEDB.DLL" available in the path "C:\Program files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\Office16"

Also, I have installed "Microsoft Access Database Engine 2016 Redistributable". After this i tried with both "Provider=Microsoft.ACE.OLEDB.12.0" & Provider=Microsoft.ACE.OLEDB.16.0" also it gave the same error.

Then
I tried with below code
gdDB.Open "Driver={Microsoft Access Driver (*.mdb, *.accdb)};Data Source= "UserProfilePath & AccessDB.accdb"
For this code, it is giving the error "Data source is too long" Unfortunately i cannot change the path of this AccessDB due to restriction.

Please help.
Posted
Updated 10-May-21 23:12pm

You have hit the brick wall that was always just around the corner - you are trying to get ancient 32bit technology to interact directly with modern 64bit technology. Unlikely that this will ever work properly, although there are apparently some work-arounds - see
[RESOLVED] Problem with VB Office and VB6 dlls-VBForums[^]

Many years ago I had something similar working to get VB6 to interact with 64bit IBM-MQ using the principles I have re-found on this article - Why Thunking Is Necessary - Windows drivers | Microsoft Docs[^]

Another alternative is to ditch the Access database in favour of SQL Server Express LocalDB - SQL Server | Microsoft Docs[^] - there are MS articles on how to connect VB6 to SQL Server.

Having said all that, my advice is to ditch VB6 and rewrite your application in VB.NET.
 
Share this answer
 
because VB6 is a 32 bit application, you need to install the 32 bit version of the Microsoft.ACE.OLEDB.12.0.

I'm also using vb6 with DAO, so I need to install the 32 bit version of Ms Office 12.0 Access Data Engine into win 10 64bit for VB to work. It can't find the 64 bit version of the data engine.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900