Error 800a0e7a

When I try to connect to my database  I get error 800a0e7a:
ADO could not find the specified provider.
What is wrong?
I am trying to connect to an Access database without DSN.
I have tried different types of code but everytime the same thing happens.
I am using PWS and Ie5 and I am writing my code in Notepad.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Try this

Set objDataConn = Server.CreateObject("ADODB.Connection")
      objDataConn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;User ID=Admin;Data Source=" & session("MDB") &";Mode=Share Deny None;Extended Properties=" & chr(34)& ";COUNTRY=0;CP=1252;LANGID=0x0409" & chr(34) & ";Locale Identifier=1033;Jet OLEDB:System database="& chr(34) & chr(34) & ";Jet OLEDB:Registry Path=" & chr(34) & chr(34) & ";Jet OLEDB:Database Password=" & chr(34) & chr(34) & ";Jet OLEDB:Global Partial Bulk Ops=2"

This sould open a connection to the database you specified in session("MDB")

you can then write
Dim objRSGetRecordset

SQL ="some sql query"

Set objRSGetRecordset = Server.CreateObject("ADODB.RecordSet")
objRSGetRecordset.Open SQL, objDataConn, 3, 1
Set RS = objRSGetRecordset

and get values from the recoredset by writing vlaue=RS("SOME_FIELD")

Hope this helps
ajohansAuthor Commented:
I tried your answer but the result was the same.
I got the same error message.
Is there something I have forgotten to download or a setting I haven't done?
ajohansAuthor Commented:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
The codes is as follows:

<!--#INCLUDE VIRTUAL="/satofta/adovbsinc.asp"-->

Dim objConnect
Dim cnpath

Set objConnect = Server.CreateObject("ADODB.Connection")
cnpath="DBQ=" & server.mappath("/satofta/kunder.mdb")
objConnect.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath



Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

ajohansAuthor Commented:
Adjusted points to 200

You should note on the error message, ie could not find the provider. This probably mean your system didn't know the provider you used..or you're wrong to specified the db provider.

I assume you use Jet Provider for MSAccess, NOte: if you used Access2000 then you should use Jet version 4.00

To know, if your provider exists then start Visual Basic 6 (I hope you have this one).  Open new EXE project, From Project menu select references, select Microsoft Activex data objects 2.0 Library and Microsoft Activex data objects REcordset 2.0.  Then in the toolbox right click to add new component, add Microsoft ADO Data Control 6 (OLEDB).

Now you have an ADODC control, put it in a form, right click the control and select ADODC properties. In the property pages, select use connection string and click build button. Now you can look any db provider list that registered to your system if you use Access without need odbc then at least you must have MS Jet 3.51 oledb provider and remember if you use access 2000 then you should use jet 4.00

If Jet OLEDB provider exists then, your connection string should like this: (use Access2000)

sConnString = "Microsoft.Jet.OLEDB.4.0;Data Source=Yourdatabase.mdb;Persist Security Info=False"

And remember DO NOT ADD ADDITIONAL SPACES in your connection string, write it as is. I usually use Visual Basic 6 to build a long connection string, as I had exlpained to you how to build connection string using VB6.

Good Luck
ajohansAuthor Commented:
I don't have VB6 is there another way to see what version I have?
right click on msadc.dll and look at the version.  I would suggest that you simply go download the latest mdac files and install them.
ajohansAuthor Commented:
That solved everything!
Thank you!
Can you send me a solution so I can give you your points.
here ya go, glad I could help

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.