ASP Classic: Database problem
am 20.08.2007 15:50:04 von schurst30Hi, I am currently trying to get back into ASP and have begun looking at an
old webpage I developed some years ago, it was fully functional back in 2002
and I had it up and running with no problems. I have just recently bought a
new PC with Windows Vista Home Premium on it and installed IIS. When I try
and connect to my data base I get the following error message retunred:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Disk or network error.
/joynermorgan/take_registration.asp, line 50
Line 50 looks like this:
writeDB.Open "joynerm"
joynerm is the system DSN that I created to connect to my database.
The following is the actual code from the file take_registration.asp where
the error is occuring:
<%
if p_password1 = p_password2 then
set writeDB = Server.CreateObject ("ADODB.Connection")
writeDB.Open "joynerm"
sqlText = "select * from members where username = '"& p_username &"'"
set userSet = DataBase.Execute (sqlText)
if userSet.EOF then
userSet.Close
set userSet = Nothing
theSQL = "insert into members"
theSQL = theSQL & " (username, pass, first_name, last_name, email) "
theSQL = theSQL & "values '"&p_username&"', '"&p_password1&"',
'"&p_firstname&"', '"&p_lastname&"', '"&p_email&"')"
end if
DataBase.Execute (theSQL)
DataBase.Close
set DataBase = Nothing
Response.Write "
User Registration
"Response.Write "
Thank you for your registration, if you wish you may
now ."
else
Response.Redirect "/joynermorgan/register.asp?retry=usernameunavail"
end if
%>
I am fully aware that my coding techniques are out of date and therefore
will seem a little strange but as I said before, when I had this website up
and running some 5 years ago I never had a problem with this code at all.
Does anybody have any suggestions as to what could be the problem here?
Any help given would be much appreciated.
Many thanks in advance.
Spencer