Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

yet another Access DSN problem

Status
Not open for further replies.

LEICJDN1

Technical User
Nov 27, 2002
201
GB
Aaaaaaaagh!

THis is driving me mad (again!)

Have an ASP website which works perfectly on its web server with connection to an Access DB producing no errors.

Have recently upgraded to XP Pro so installed IIS in the hope it would allow me to edit / update my web on my desktop then upload.

On first try worked fine. It now seems I am getting random 8000405 errors and failed connections.

I know the following code works on the web server:

<%
Email = Request.Form("email")
Username = Request.Form("username")
Password = Request.Form("password")
Grade = Request.Form("Grade")
Security = Request.Form("Securityword")
Reminder = Request.Form("Reminder")

Const adOpenStatic = 3
Const adUseClient = 3
Const adLockPessimistic = 2
Dim Conn
DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("users.mdb") & ";Password=********"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open (DSN)
Dim rs
rs.AddNew
rs("name") = ""& Username & ""
rs("pword") = ""& Password & ""
rs("mailaddress") = ""& Email & ""
rs("grade") = ""& Grade & ""
rs("security") = ""& Security & ""
rs("reminder") = ""& Reminder & ""

lots more bits in here removed

rs.Update
end if
rs.Close
set rs = Nothing
Conn.close
set Conn = Nothing
Session("LoggedIN") = "TRUE"
%>

The error seems to be in establishing the DSN connection. Now I would like to keep the code which works fine on the server for obvious reasons in ease of site maintenance.

Any ideas why I get these errors - but not everytime? Have declared the database as a User DSN using MS Access Database driver in the ODBC Data Source Administrator but still no joy.

Any help much appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top