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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update multiple fields

Status
Not open for further replies.

Ouch

Programmer
Jul 17, 2001
159
GB
<!--#include file=&quot;DSNConnection.asp&quot;-->

<%
prefix = request.form(&quot;prefix&quot;)
i need to update a single record
i have tried this but it comes back with the error to few parameters expected 1

------code------
<%
webctid = request.form(&quot;webctid&quot;)
password = request.form(&quot;password&quot;)
authorisedby = request.form(&quot;authorisedby&quot;)

sqlStr = &quot;UPDATE tblusers SET &quot;
sqlStr = sqlStr & &quot;user_id_prefix = '&quot; & prefix & &quot; ',&quot;
sqlStr = sqlStr & &quot;sugg_pass = '&quot; & password & &quot;'&quot;
sqlStr = sqlStr & &quot; WHERE id = 3 &quot;
response.write sqlStr
dbConn.execute(sqlStr)
%>
can anyone help?
your request hase been completed
 
try replacing

sqlStr = sqlStr & &quot;sugg_pass = '&quot; & password & &quot;'&quot;

with

sqlStr = sqlStr & &quot; sugg_pass = '&quot; & password & &quot;'&quot;


if its not this then the problem is elsewhere.
 
<%
webctid = request.form(&quot;webctid&quot;)
password = request.form(&quot;password&quot;)
authorisedby = request.form(&quot;authorisedby&quot;)

sqlStr = &quot;UPDATE tblusers SET &quot; & _
&quot; user_id_prefix = '&quot; & prefix & &quot; ', &quot; & _
&quot;sugg_pass = '&quot; & password & &quot;'&quot; & _
&quot; WHERE id = 3 &quot;
response.write sqlStr
dbConn.execute(sqlStr)
%> Regards

Big Bad Dave

logo.gif


davidbyng@hotmail.com
 
thanks i sorted it...

seems it doesnt like 'password' as a variable name
changed 'password' to 'suggpassword' and it worked fine

cheers for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top