p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

asp_databases thread: Connection Error Using ASP to Access

Message #1 by "Meredith Booker" <Meredith_Booker@d...> on Fri, 21 Mar 2003 11:48:08 -0500
I am connecting to an Access 2000 database from an ASP page.

I am using ADO.

At times, I get the following message:

Error Type:
Provider (0x80004005)
Unspecified error
/issm/arts/DBConn.inc, line 17

my DBConn.inc file:
  Set objConn = Server.CreateObject("ADODB.Connection")

  strDBPath =  Server.MapPath("db3.mdb")
  strSource="Driver={Microsoft Access Driver (*.mdb)}"
  strSource=strSource & "; DBQ=" & strDBPath & ";"
  objConn.ConnectionString = strSource
  objConn.ConnectionTimeout = 10

  if err.Number<>0 then
    Response.write "<br> ERROR ON Connection Opening<br>"
    Response.write "<br> err Number: " & err.Number & "<br>"
    Response.write "<br> err Description: " & err.Description & "<br>"
    Response.write "<br> err SQL State: " & err.SQLState & "<br>"
    Response.write "<br> err Source: " & err.Source & "<br>"
  end if

line 17 is "objConn.open"

The error does NOT occur all the time.

The user will be in the system working fine and then at any
given moment, the error occurs. Then after minutes pass, the
error seems to clear up and the user can continue working.

Anyone have any suggestions or a solution?

Message #2 by skip@f... on Sat, 22 Mar 2003 03:34:59
Try this for you ConnectionString;

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=databaseName"

(If you need to add a user account, append the following:
  ";User ID=userName;Password=userPassword"

I've never gotten the provider you're using to work *at all*!


  Return to Index