Solved

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

Posted on 2016-11-24
11
96 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +2
11 Comments
 
LVL 50

Expert Comment

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

/gustav
1
 
LVL 17

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 50

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

734 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