Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

Provider not found with ado.net

I am using this code to connect to an access database in vb2008 and using the adodb reference but it says:

"Provider cannot be found. It may not be properly installed."

I use the Jet provider in other programs on the computer so I know it is there.

Dim cn As New ADODB.Connection
        Dim rs As New ADODB.Recordset
        On Error GoTo ErrTrap

        cn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\builtin.mdb;User Id=admin;Password=;")
        rs.Open("select * from TestCase", cn)
        While Not rs.EOF
            MsgBox(rs("EmailAddress").Value)
            rs.MoveNext()
        End While
        rs.Close()
        cn.Close()
0
onemorecoke
Asked:
onemorecoke
  • 4
  • 2
1 Solution
 
planoczCommented:
Did you look in your refernces in that project to see if you really are seeing ADO?
0
 
onemorecokeAuthor Commented:
My reference should be ADODB.DLL right?  Seems like everything is good.  I use the same connection string in a VB6 program with no problems.
0
 
onemorecokeAuthor Commented:
Could it be a 32bit/64bit issue?  Started up a new project with just defaults so I am assuming it is 32bit.
0
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.

 
planoczCommented:
You should be using something like this
Microsoft ActiveX Data Objects 2.8 Library
Are you using VS 2005 or 2008?
0
 
onemorecokeAuthor Commented:
I figured it out.  I had to force the configuration manager to be in x86 mode, then it started understanding the Jet provider.  I thought it would default to x86 but apparently not.
0
 
onemorecokeAuthor Commented:
No one answered it correctly but I kept working on it
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

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