Solved

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\folder\access.accdb; is makking a error

Posted on 2016-11-24
11
28 Views
Last Modified: 2016-11-25
I am running VB.Net 2015, and I want to edit a 2016 database - 64 bit.
I am using the following code:

Dim concstr As String
      concstr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\folder\accessDB.accdb;"
            Dim newcnct As New OleDbConnection(concstr)
                     newcnct.Open()

When it comes to this last line with the Open command, it generates an error.
0
Comment
Question by:Moshe Singer
  • 5
  • 2
  • 2
  • +2
11 Comments
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 41900906
Yes, and we are supposed to guess what the error is?

/gustav
0
 
LVL 13

Expert Comment

by:John Tsioumpris
ID: 41900910
Is your VB.net application 64 bit ?
0
 

Author Comment

by:Moshe Singer
ID: 41900913
It skips all the rest of the codes and then jumps out to the previous procedure that called this function.
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 41900923
You're probably lacking the 64-bit driver for JET.  you can download it here:

http://www.microsoft.com/downloads/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en

Jim
0
 

Author Comment

by:Moshe Singer
ID: 41900927
Is your VB.net application 64 bit ?

 Visual Studio 2015 is still a 32-bit application
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Assisted Solution

by:Moshe Singer
Moshe Singer earned 0 total points
ID: 41900933
You're probably lacking the 64-bit driver for JET.  you can download it here:
http://www.microsoft.com/downloads/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en



I downloaded it. This is the header of the file
Microsoft Access Database Engine 2010 Redistributable


It did not help the problem.
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 41901212
It skips all the rest of the codes and then jumps out to the previous procedure that called this function.

If you keep the error message secret, we are still left guessing what the error is.

/gustav
0
 
LVL 57
ID: 41901440
<<I downloaded it. This is the header of the file
Microsoft Access Database Engine 2010 Redistributable


It did not help the problem.>>

 We'll need some more information then.    Is this a new install, new app, is your code running 32 or 64 bit, and of course as gustav said, what the error is.

It could be anything....

Jim.
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 41901486
Try this:

1. Open the "My Project" page in Visual Studio.
2. Select the Compile option on the leftside listing.
3. Set "Target CPU" to "x86"
0
 

Author Comment

by:Moshe Singer
ID: 41901727
1. Open the "My Project" page in Visual Studio.
2. Select the Compile option on the leftside listing.
3. Set "Target CPU" to "x86"

thanks
I changed to  "x86"
it was the same it skiped the of codes

then I changed to "x64"

then I got this masseage

An unhandled exception of type 'System.InvalidOperationException' occurred in System.Data.dll
Additional information: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
0
 

Author Closing Comment

by:Moshe Singer
ID: 41901756
I CHANGED TO "X64" THEN I INSTALLED AccessDatabaseEngine_X64.exe
THEN IT WORKED FINE
THANKS A MILION
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now