Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE!! (0x80040E10)No value given for one or more required parameter 1

Status
Not open for further replies.

ro6er

Programmer
Jul 1, 2003
76
This is really annoying me I'm sure its something simple but what???

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
With response.write mySQL in place it brings back the following:
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
 
Paste the UPDATE statement you got from the Response.Write(mySQL) into the query builder in Access.

If you are able to save it then it means the syntax is fine but you will probably find when you try and execute the query it will ask you for a value.

This will be where your problem lies.
 
Username is a text field, but you don't have parenthesis around it.

WHERE username = [!]'[/!]test[!]'[/!]

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks Gmmastros. I knew it was something simple.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top