Avatar of Thomas
Thomas
Flag 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
Microsoft Access

Avatar of undefined
Last Comment
crystal (strive4peace) - Microsoft MVP, Access

8/22/2022 - Mon
Jim Dettman (EE MVE)

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.

Jim.
Thomas

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

ASKER
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'.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Jim Dettman (EE MVE)

<<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.

Jim.
Jim Dettman (EE MVE)

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.

Jim.
Jim Dettman (EE MVE)

Also, please look for:

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

and

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.

Jim.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Thomas

ASKER
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
Jim Dettman (EE MVE)

<<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.

Jim.
Thomas

ASKER
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.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Jim Dettman (EE MVE)

<<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.

Jim.
Thomas

ASKER
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.
Jim Dettman (EE MVE)

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.

Jim.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Thomas

ASKER
Jim, thanks, I will verify that.
FERNANDO SALLES

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

ASKER
Fernando, exactly what is your connection string in vb.net that connects to Access 2016? Thanks.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
FERNANDO SALLES

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"
Thomas

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

ASKER
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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
crystal (strive4peace) - Microsoft MVP, Access

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Thomas

ASKER
I am linking a vb.net 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 vb.net to Access was successful and was able to extract values from the Access database and use in the vb.net 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.
Thomas

ASKER
Thanks again crystal.
crystal (strive4peace) - Microsoft MVP, Access

you're welcome, Thos ~ happy to help
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes