mattastic
08-27-2008, 08:26 AM
Hi guys,
I haven't used asp for a very long time, but now I need to setup a basic form submitting to a Db. I've got access to the server that hosts the access Db,
My code is below what connects to the DB, but is doesn't work.
I keep getting this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x126c Thread 0x1644 DBC 0x8bcae0c Jet'.
/index/survey.asp, line 99
Can anyone please help?
Thankyou
else
' if the user did input a choice on the vote/ballot
' check to see if their ip address is already in the db
accessdb="digerati"
cn="driver={Microsoft Access Driver (*.mdb)};"
cn=cn & "dbq=" & server.mappath(accessdb)
set rs = server.createobject("ADODB.Recordset")
sql = "select userip from survey where userip ='" & u_ip & "'"
rs.Open sql, cn
if rs.eof then
' if the user has not voted previously indicate it
been_here_before="No"
end if
rs.close
if been_here_before = "No" then
' Since the user has not voted previously their input
' their vote will be added to the db
sql = "insert into survey(ip, selection" & u_input &") "
sql = sql & "values ('" & u_ip & "',1)"
rs.Open sql, cn
end if
I haven't used asp for a very long time, but now I need to setup a basic form submitting to a Db. I've got access to the server that hosts the access Db,
My code is below what connects to the DB, but is doesn't work.
I keep getting this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x126c Thread 0x1644 DBC 0x8bcae0c Jet'.
/index/survey.asp, line 99
Can anyone please help?
Thankyou
else
' if the user did input a choice on the vote/ballot
' check to see if their ip address is already in the db
accessdb="digerati"
cn="driver={Microsoft Access Driver (*.mdb)};"
cn=cn & "dbq=" & server.mappath(accessdb)
set rs = server.createobject("ADODB.Recordset")
sql = "select userip from survey where userip ='" & u_ip & "'"
rs.Open sql, cn
if rs.eof then
' if the user has not voted previously indicate it
been_here_before="No"
end if
rs.close
if been_here_before = "No" then
' Since the user has not voted previously their input
' their vote will be added to the db
sql = "insert into survey(ip, selection" & u_input &") "
sql = sql & "values ('" & u_ip & "',1)"
rs.Open sql, cn
end if