Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-11-24
11
Medium Priority
?
219 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 52

Expert Comment

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

/gustav
1
 
LVL 19

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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 1000 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 52

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 58
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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

927 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