Link to home
Start Free TrialLog in
Avatar of Thomas
ThomasFlag for United States of America

asked on

What is Access 2016 OLEDB connection string

I use Provider=Microsoft.ACE.OLEDB.12.0;Data Source=
for Access 2013 but this doesn't seem to work with Access 2016
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Microsoft.ACE.OLEDB.16.0; should be correct.

15 was Access 2013, 14 was Access 2010, and  12 is 2007.

Haven't tried it myself as yet though.

Avatar of Thomas


Something else must be involved because i have been successfully using 12 for Access 2013.
Avatar of Thomas


Microsoft.ACE.OLEDB.16.0 doesn't work for me.

I purchased and installed Office 365, which includes Access and its About says 'Access 2016'.
<<Something else must be involved because i have been successfully using 12 for Access 2013.>>

Depends on what you have installed and registered as a provider.   If all that is on the station is 2016, then it should be the 16 provider.

 I have not at yet used Access 2016, so I'll need to do some checking.

Is Access 2016 installed 32 or 64 bit?   And are there any other versions of Access installed on the PC?   That includes the runtime or standalone engine componets.

Also, please look for:

C:\Program Files\Common Files\Microsoft Shared\OFFICE16\ACEOLDDB.DLL


C:\Program Files\Common Files (x86)\Microsoft Shared\OFFICE16\ACEOLDDB.DLL

right click on them, select properties and give me the version numbers.

 If they do not exist, then see if there are any other OFFICExx folders under \Mircosoft Shared  and look for the dll (actually, a search in Files Explorer probably would be faster).

 Need where you find them and what the versions are.

Avatar of Thomas


OS is 64 bit; Access 2016 is 32-bit.
No other versions of Access are installed.

Assuming you meant ACEOLEDB.DLL rather than ACEOLDDB.DLL.
Files Explorer found 1 instance of ACEOLEDB.DLL in
C:\Program Files (x86)\Microsoft Office\root\VFS\ProgramFilesCommonX86\Microsoft Shared\Office16
ACEOLEDB.DLL Version # = 16.0.7766.6032
<<Assuming you meant ACEOLEDB.DLL rather than ACEOLDDB.DLL. >>

 Yeah, sorry, typo.

<<Files Explorer found 1 instance of ACEOLEDB.DLL in >>

 OK, so something then is wrong with the registration.

 Try running a repair on the office install and see if that takes care of it.  If not, then something is mucked up.  I don't remember how to re-register it manually, but I will find out if the repair doesn't do it for you.

Avatar of Thomas


Note that my Access 2016 is Office 365, which may have a different organization on DLL files.

I did an update but there is no 'repair' on Office 365. The problem remains.
<<I did an update but there is no 'repair' on Office 365. The problem remains.>>

Press the Windows Logo Key, type in "Control Panel", go to "Programs and Features", Select Microsoft Office 365, then Change.   You should have an Online Repair option.

 Choose that.

Let me know.

Avatar of Thomas


I did the online repair; however, the problem remains.

Since my issue involves both vb.NET and Access, I plan to connect with Scott McDaniel for help.

Thanks, Jim.
That's a good idea...Scott's done mostly .Net for the past few years, were I've been mostly Access.

But I didn't realize this involved .Net.

One thing for sure then is you want to make sure your project is compiled in same bitness as the Access install.  If not, you're going to get a not registered like you are.   If Access is 32 bit, then the .Net project must be compiled 32 bit.     And it must be done so specifically.  Leaving it on the default setting doesn't work.

Avatar of Thomas


Jim, thanks, I will verify that.

por favor, alguém pode me fornecer uma string de conexão com VISUAL BASIC 6.0 COM ACCESS  2016
Avatar of Thomas


Fernando, exactly what is your connection string in that connects to Access 2016? Thanks.
Public Function SalvarCliente(ByVal NOME As String, ByVal CPF As String, ByVal ender As String, ByVal cid As String, _
ByVal bai As String, ByVal telef As String, ByVal cep As String)

Dim sql As String
Dim rs As adodb.Recordset

    sql = "insert into cliente(NOME,CPF,END,CEP,CIDADE,BAIRRO,TELEFONE) values ('" & NOME & "','" & CPF & "','" & ender & "','" & cep & "','" & cid & "','" & bai & "','" & telef & "')"
    Set rs = New adodb.Recordset
    rs.CursorLocation = adUseClient
    rs.Open sql, con, adOpenKeyset, adLockOptimistic  "the error is in this line "object not opened"
Avatar of Thomas


Fernando, your code snippet does not define 'con', which is actually what I'm interested in. Thanks.
Avatar of Thomas


It appears that Fernando has a solution; however, he did not define the variable 'con'. I added a comment asking him for that definition and he has yet to respond. Jim, maybe you could contact him to provide his definition of the 'con' variable.
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

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


I am linking a program to access database. I followed crystal's links and installed Microsoft Access Database Engine 2016 (32-bit version in my case). With that in place, my connection from to Access was successful and was able to extract values from the Access database and use in the program.

I used a connection string of:
connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & datafile & ";" & "Jet OLEDB:Database Password=" & password & ";"

This solution was way beyond my pay grade. Thank you crystal. You're a genius.
Avatar of Thomas


Thanks again crystal.
you're welcome, Thos ~ happy to help