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("ADODB.Connection"
conn.open myConn
SQLstmt = "UPDATE tblClient "
SQLStmt = SQLStmt & "SET fldClientName='" & Request.Form("txtClientName"
& "'"
SQLStmt = SQLStmt & ", fldContDate='" & Request.Form("txtContractDate"
& "'"
SQLStmt = SQLStmt & ", fldInsCarrier='" & Request.Form("txtInsCarrier"
& "'"
SQLStmt = SQLStmt & ", fldClientCode='" & Request.Form("txtClientCode"
& "'"
SQLStmt = SQLStmt & ", fldCSRname='" & Request.Form("txtCSRname"
& "'"
SQLStmt = SQLStmt & ", fldPremiumAmount=" & request.form("txtPremAmount"
& ""
SQLStmt = SQLStmt & " WHERE clientID=" & Request.Form("txtClientID"
'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. "Damn the torpedoes, full speed ahead!"
-Adm. James Farragut
Stuart
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("ADODB.Connection"
conn.open myConn
SQLstmt = "UPDATE tblClient "
SQLStmt = SQLStmt & "SET fldClientName='" & Request.Form("txtClientName"
SQLStmt = SQLStmt & ", fldContDate='" & Request.Form("txtContractDate"
SQLStmt = SQLStmt & ", fldInsCarrier='" & Request.Form("txtInsCarrier"
SQLStmt = SQLStmt & ", fldClientCode='" & Request.Form("txtClientCode"
SQLStmt = SQLStmt & ", fldCSRname='" & Request.Form("txtCSRname"
SQLStmt = SQLStmt & ", fldPremiumAmount=" & request.form("txtPremAmount"
SQLStmt = SQLStmt & " WHERE clientID=" & Request.Form("txtClientID"
'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. "Damn the torpedoes, full speed ahead!"
-Adm. James Farragut
Stuart