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

update Error

Status
Not open for further replies.

schase

Technical User
Sep 7, 2001
1,756
US
Hi guys,

I now get a "too few parameters, expected one" error on this update -

I have the following field names in an Access Database.

clientID - Autonumber
fldClientName - Text
fldContDate - Text
fldInsCarrier - Text
fldClientCode - Text
fldCSRname - Text
fldPremAmount - Number (long integer)

I've got the following update code.

<%
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open myConn
SQLstmt = &quot;UPDATE tblClient &quot;
SQLStmt = SQLStmt & &quot;SET fldClientName='&quot; & Request.Form(&quot;txtClientName&quot;) & &quot;'&quot;
SQLStmt = SQLStmt & &quot;, fldContDate='&quot; & Request.Form(&quot;txtContractDate&quot;) & &quot;'&quot;
SQLStmt = SQLStmt & &quot;, fldInsCarrier='&quot; & Request.Form(&quot;txtInsCarrier&quot;) & &quot;'&quot;
SQLStmt = SQLStmt & &quot;, fldClientCode='&quot; & Request.Form(&quot;txtClientCode&quot;) & &quot;'&quot;
SQLStmt = SQLStmt & &quot;, fldCSRname='&quot; & Request.Form(&quot;txtCSRname&quot;) & &quot;'&quot;
SQLStmt = SQLStmt & &quot;, fldPremiumAmount=&quot; & request.form(&quot;txtPremAmount&quot;) & &quot;&quot;
SQLStmt = SQLStmt & &quot; WHERE clientID=&quot; & Request.Form(&quot;txtClientID&quot;)
'Set RS = Conn.Execute(SQLStmt)
response.write SQLStmt
set rstemp=nothing
Conn.Close
set conntemp=nothing
%>

and doing a response.write the SQL shows this

UPDATE tblClient SET fldClientName='Nut House', fldContDate='10/15/2002', fldInsCarrier='Safety', fldClientCode='SHAWN1', fldCSRname='sc', fldPremiumAmount=10000 WHERE clientID=9


Viewing, inserting and deleting are no problem. anybody see anything that I keep missing? I've also tried doing the date as short date - and updating with the date commented out. - to no avail either.

Thank you in advance. &quot;Damn the torpedoes, full speed ahead!&quot;

-Adm. James Farragut

Stuart
 
ahh never mind - typo. &quot;Damn the torpedoes, full speed ahead!&quot;

-Adm. James Farragut

Stuart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top