Solved

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

Posted on 2016-11-24
11
64 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
1
 
LVL 15

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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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
 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

820 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