Hey, I got problems with updating a date and time information into an accessdatabase.
This is the code I use
- Code: Select all
<%
If Session("loggedin") <> true Then
Response.Redirect("index.asp?login=failed")
End If
%>
<%
Dim username
username = Session.Contents("username")
%>
<%
Response.buffer=True
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("accounts.mdb")
%>
Test
<%
Dim time
time = now()
SQL = "UPDATE userlist SET last_login = '" & time & "' where id = '"& username & "'"
Connect.Execute(SQL)
Connect.Close
Set Connect = Nothing
%>
But when I run the code, I get this error
- Code: Select all
Test
Microsoft OLE DB Provider for ODBC Driverserror '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. /rpg/test.asp, line 21