Ik krijg de volgende melding bij het willen versturen van een simple guestbook entry
db = acces
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/save.asp, line 21
<%
Dim guestbook
Dim Rs
Dim sql
Dim guest_ip
Function RemoveHTML(byVal sInput)
'same fixQuotes function from step2.asp
RemoveHTML = Replace(sInput, "<img src", "????")
End Function
'Create an ADO connection and recordset object
Set guestbook = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
'Set an active connection and select fields from the database
guestbook.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")
sql= "SELECT sign_date, name, email, location, comments, guest_ip FROM guests;"
'Set the lock and cursor type
Rs.CursorType = 1
Rs.LockType = 3
21 -- > Rs.Open sql, guestbook 'Open the recordset with sql query
Rs.AddNew 'Prepare the database to add a new record and add
Rs.Fields("sign_date") = Request.Form("sign_date")
Rs.Fields("name") = Request.Form("name")
Rs.Fields("email") = Request.Form("email")
Rs.Fields("location") = Request.Form("location")
Rs.Fields("comments") = RemoveHTML(Request.Form("comments"))
Rs.Fields("guest_ip") = Request.Form("ip")
Rs.Update 'Save the update
Rs.Close
Set Rs = Nothing
Set guestbook = Nothing
%>
<script>
location = "Index.asp";
</script>
db = acces
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/save.asp, line 21
<%
Dim guestbook
Dim Rs
Dim sql
Dim guest_ip
Function RemoveHTML(byVal sInput)
'same fixQuotes function from step2.asp
RemoveHTML = Replace(sInput, "<img src", "????")
End Function
'Create an ADO connection and recordset object
Set guestbook = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
'Set an active connection and select fields from the database
guestbook.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")
sql= "SELECT sign_date, name, email, location, comments, guest_ip FROM guests;"
'Set the lock and cursor type
Rs.CursorType = 1
Rs.LockType = 3
21 -- > Rs.Open sql, guestbook 'Open the recordset with sql query
Rs.AddNew 'Prepare the database to add a new record and add
Rs.Fields("sign_date") = Request.Form("sign_date")
Rs.Fields("name") = Request.Form("name")
Rs.Fields("email") = Request.Form("email")
Rs.Fields("location") = Request.Form("location")
Rs.Fields("comments") = RemoveHTML(Request.Form("comments"))
Rs.Fields("guest_ip") = Request.Form("ip")
Rs.Update 'Save the update
Rs.Close
Set Rs = Nothing
Set guestbook = Nothing
%>
<script>
location = "Index.asp";
</script>