ro6er
Programmer
- Jul 1, 2003
- 76
This is really annoying me I'm sure its something simple but what???
My first page is:
Which posts to this page:
I left the following commented out so I could test the sql was working ok.
With response.write mySQL in place it brings back the following:
So why then is it saying:
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
My db design looks like this:
Thanks for any help.
Roger
My first page is:
Code:
<!--#include file="database.asp"-->
<%
mySQL = "SELECT * FROM login WHERE username = 'test'"
Set rs = Conn.Execute(mySQL)
%>
<form name=frmCreate method=POST action="modify.asp">
<table>
<tr><td valign=top align=right>Username: </td><td><input type=text name=txtUsername value="<%=rs("username")%>"></td></tr><tr><td valign=top align=right>Password: </td><td><input type=password name=txtPassword value="<%=rs("password")%>"></td></tr>
<tr><td valign=top align=right>Title: </td><td><input type=text name=txtTitle value="<%=rs("title")%>"></td></tr>
<tr><td valign=top align=right>Full name: </td><td><input type=text name=txtFullname value="<%=rs("fullname")%>"></td></tr>
<tr><td valign=top align=right>House number: </td><td><input type=text name=txtNum value="<%=rs("num")%>"></td></tr>
<tr><td valign=top align=right>Street: </td><td><input type=text name=txtStreet value="<%=rs("street")%>"></td></tr>
<tr><td valign=top align=right>City: </td><td><input type=text name=txtCity value="<%=rs("city")%>"></td></tr>
<tr><td valign=top align=right>Postcode: </td><td><input type=text name=txtPostcode value="<%=rs("postcode")%>"></td></tr>
<tr><td valign=top align=right>Phone: </td><td><input type=text name=txtPhone value="<%=rs("phone")%>"></td></tr>
<tr><td valign=top align=right>Email: </td><td><input type=text name=txtEmail value="<%=rs("email")%>"></td></tr>
<tr><td valign=top align=right></td><td>
<input type="image" src="images/update.gif" border=0 name=cmdSubmit value=modify></td></tr></table>
</form>
Which posts to this page:
Code:
<!--#include file="database.asp"-->
<%
mySQL = "UPDATE login SET username = '"&Request.Form("txtUsername")&"',"
mySQL = mySQL & "[password] = '"&Request.Form("txtPassword")&"',"
mySQL = mySQL & "fullname = '"&Request.Form("txtFullname")&"',"
mySQL = mySQL & "num = '"&Request.Form("txtNum")&"',"
mySQL = mySQL & "title = '"&Request.Form("txtTitle")&"',"
mySQL = mySQL & "street = '"&Request.Form("txtStreet")&"',"
mySQL = mySQL & "city = '"&Request.Form("txtCity")&"',"
mySQL = mySQL & "postcode = '"&Request.Form("txtPostcode")&"',"
mySQL = mySQL & "phone = '"&Request.Form("txtPhone")&"',"
mySQL = mySQL & "email = '"&Request.Form("txtEmail")&"'"
mySQL = mySQL & " WHERE username = "&Request.Form("txtUsername")&" "
Set Rs = Conn.Execute(mySQL)
'response.write mySQL
'response.end
'Rs.Open mySQL, Conn
'Conn.Close
'Set Rs=Nothing
Response.Redirect("processorder.asp")
%>
I left the following commented out so I could test the sql was working ok.
Code:
'response.write mySQL
'response.end
'Rs.Open mySQL, Conn
'Conn.Close
'Set Rs=Nothing
Code:
UPDATE login SET username = 'test',[password] = 'test',fullname = 'Bob Bobbington',num = '44',title = 'Mr',street = 'Bob Street',city = 'Bobchester',postcode = 'B088OB',phone = '80880880880',email = 'bob@bmail.bob' WHERE username = test
So why then is it saying:
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
My db design looks like this:
Code:
username Text
password Text
email Text
num number
fullname Text
title Text
street Text
city Text
postcode Text
phone Text
destination Text
Thanks for any help.
Roger