I have written some ASP code. A form prompts to have two text input boxes filled in and twhen the user resses 'Submit' they should be written to a database.
My code is as follows:
<%
response.write("reached code now"
response.write("Name " & request.form("txtName")
response.write("Comment" & request.form("txtComments")
if request.form("txtName" <> "" then
if request.form("txtComments" <> "" then
strSQL = "INSERT INTO tblGuestBook (PostedBy, Comment) VALUES (" & request.form("txtName" & "," & request.form("txtComments" & ""
set oRS = oConn.Execute(strSQL)
end if
end if
%>
I then get the following error:
What I don't undertand is that as far as I am aware I am passing two parameters (the 2 values)
Any help much appreciated!
My code is as follows:
<%
response.write("reached code now"
response.write("Name " & request.form("txtName")
response.write("Comment" & request.form("txtComments")
if request.form("txtName" <> "" then
if request.form("txtComments" <> "" then
strSQL = "INSERT INTO tblGuestBook (PostedBy, Comment) VALUES (" & request.form("txtName" & "," & request.form("txtComments" & ""
set oRS = oConn.Execute(strSQL)
end if
end if
%>
I then get the following error:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
What I don't undertand is that as far as I am aware I am passing two parameters (the 2 values)
Any help much appreciated!