Link to home
Start Free TrialLog in
Avatar of onemorecoke
onemorecoke

asked on

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()
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

Did you look in your refernces in that project to see if you really are seeing ADO?
Avatar of onemorecoke
onemorecoke

ASKER

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.
Could it be a 32bit/64bit issue?  Started up a new project with just defaults so I am assuming it is 32bit.
You should be using something like this
Microsoft ActiveX Data Objects 2.8 Library
Are you using VS 2005 or 2008?
ASKER CERTIFIED SOLUTION
Avatar of onemorecoke
onemorecoke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No one answered it correctly but I kept working on it