Question ACE.OLEDB.15.0 provider is not registered

rjmonteiro

New member
Joined
Mar 26, 2017
Messages
3
Programming Experience
10+
Hello friends.


First of all I'd like to give you some background on me. I'm a ABAP programer for 17 years, for those who don't know, ABAP is the programing language of SAP Software.
At University I learned Visual Basic, and through the times I've programed a little with it, basically personal stuff. I don't have a deep knowlegde of VB but enough to understand :).
As far as I remember, last time I programed with VB was in Visual Studio Express 2008 and made an application to connect to a Access Database.


This said, let me cut to the issue that made me write this post.


Now I need to create an application in Windows Forms for personal use. This application is basically a program that will use a database created in MS Access (in this case Access 2016). I have already defined the database, Tables, Relations. And was going to start the Visual Studio Part. I installed Visual Studio 2015 Express.


As this application will have a lot of nuances, I don't want to use Bindings ( I think is what it is called). I want to have control of the Selections that are made to the DB with code.


Basicaly, this application will be to manage Virtual Driving Simulation Championships, where I'll have tables for Cars, Tracks, Drivers, etc...




The first thing I did was opening the last project I did...But came across the first problem. When try to test the app, I get an error saying "The Microsoft.ACE.OLEDB.15.0 provider is not registered on the local machine". As you can see in the image, the connection string I used was to use ACE driver.

OFFICE 003.png

Now, regarding Office & Ms Access this is ther version I have
OFFICE 001.pngOFFICE 002.png


What is your opinion on what connection string I should use?
Do you have any kind of tutorial that I could see ?

Thank you all for taking the time, at least to read this :D,
Ricardo Monteiro
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,147
Location
Sydney, Australia
Programming Experience
10+
Are you saying that that same connection string worked previously? I'm not sure that I've ever seen anyone use 15 as the version number in an ACE connection string before, although that doesn't mean that it can't happen. It's usually 12 that's used but I think that 14 can work too in some cases.

The other possibility is that your app is running in a 64-bit process and you have 32-bit ACE installed or vice versa, so try changing the Target Platform in your project settings.
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,147
Location
Sydney, Australia
Programming Experience
10+
As this application will have a lot of nuances, I don't want to use Bindings ( I think is what it is called). I want to have control of the Selections that are made to the DB with code.
Data-binding has nothing specific to do with the database. Binding is about a two-way relationship between your local data, which may or may not have come from a database, and your UI. I recommend that you use data-binding by default and only not use it when you specifically need to do something that it can't support.

I assume what you actually meant was that you didn't want to use the Data Source wizard, but that's misguided too. That wizard will create a DataTable/table adapter pair for each table in your database by default but you can add, edit and remove them as you see fit, so you still have control of the SQL that they use.
 

rjmonteiro

New member
Joined
Mar 26, 2017
Messages
3
Programming Experience
10+
Hello jmcilhinney,

My mistake, 15 was another try from me :D... the original was 12 :).

And yes you we're right. My App was being targeted for a 64bit process and now I was in a machine with a 32bit Office/Ace Installed :D. I changed the Target in the App and now it works :).

Many thanx.

Now, If i want to find information/tutorials regarding ACE, is it enough to google for ACE, or does it have a specific name ? :D (sorry for my noobness :) )
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,147
Location
Sydney, Australia
Programming Experience
10+
Data access in .NET is basically the same regardless of the data source so you should look for ADO.NET tutorials. The only things that will really be specific to ACE is connection strings and the specific flavour of SQL. The former you can get info on at www.connectionstrings.com and the latter you may not even need if you're not doing anything out of the ordinary but you can get details at MSDN anyway.
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
My issue with the Ace engine is that there's a 64 bit and 32 bit that are separate & they made it so you can't have both installed at the same time, which the end result is that any applications you or I write we have to make a choice, set your app to compile for 32 bit only or 64 bit only and if the end user has the "other" one installed, well, they're out of luck unless they want to deal with figuring out how to get the other bit-version of Office installed. Office 2013 requires a Windows format & clean install, I figured that out the hard way some 5 or 6 years ago, maybe Office 2016 doesn't have that problem though most people I know still has Office 2010 & some installed 2013 side-by-side with 2010.
Even though I don't do anything with Access databases anymore, as of VS2013 and Office 2013 I still prefer to use the Jet engine and the Access database is the 2003 format (file name ends in .mdb) because the Jet engine is 32bit only (no 64bit available, no confusion) and you simply have to set your program to compile to 32 Bit only which still lets your program to run on 64bit machines. And yes Office 2013 allows you to make/change Access 2003 databases still, I would venture a guess that Office 2016 does too.
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,147
Location
Sydney, Australia
Programming Experience
10+
set your app to compile for 32 bit only or 64 bit only and if the end user has the "other" one installed, well, they're out of luck
Or you can just build a 32-bit version and a 64-bit version and let the user install the one that matches their Office version.
 

rjmonteiro

New member
Joined
Mar 26, 2017
Messages
3
Programming Experience
10+
Thank you all for your inputs..They've been very helpfull ;)
 
Top Bottom