• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

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

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
Moshe Singer
Asked:
Moshe Singer
  • 5
  • 2
  • 2
  • +2
3 Solutions
 
Gustav BrockCIOCommented:
Yes, and we are supposed to guess what the error is?

/gustav
1
 
John TsioumprisSoftware & Systems EngineerCommented:
Is your VB.net application 64 bit ?
0
 
Moshe SingerdeveloperAuthor Commented:
It skips all the rest of the codes and then jumps out to the previous procedure that called this function.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
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
 
Moshe SingerdeveloperAuthor Commented:
Is your VB.net application 64 bit ?

 Visual Studio 2015 is still a 32-bit application
0
 
Moshe SingerdeveloperAuthor Commented:
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
 
Gustav BrockCIOCommented:
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
 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
Moshe SingerdeveloperAuthor Commented:
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
 
Moshe SingerdeveloperAuthor Commented:
I CHANGED TO "X64" THEN I INSTALLED AccessDatabaseEngine_X64.exe
THEN IT WORKED FINE
THANKS A MILION
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now