• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 905
  • Last Modified:

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.
1 Solution

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



The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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.  http://www.microsoft.com/data
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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