View Single Post
  #5 (permalink)  
Old August 14th, 2003, 08:24 AM
mcalder mcalder is offline
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mcalder Send a message via Yahoo to mcalder
Default

thank you for your replies. As planeswalk pointed out, im missing some code so let me start over with this.
here is the code:
      <FORM METHOD="post" ACTION="clients1.asp?Actionvar=update">
      <B>Company</B> <INPUT TYPE="text" NAME="Company" VALUE="<%=rs("Company")%>"><BR>
      <B>Contact</B> <INPUT TYPE="text" NAME="Contact" VALUE="<%=rs("Contact")%>"><BR>
      <B>Phone Number</B> <INPUT TYPE="text" NAME="PhoneNumber" VALUE="<%=rs("PhoneNumber")%>"><BR>
      <B>Street</B> <INPUT TYPE="text" NAME="Street" VALUE="<%=rs("Street")%>"><BR>
      <B>City</B> <INPUT TYPE="text" NAME="City" VALUE="<%=rs("City")%>"><BR>
      <B>State</B> <INPUT TYPE="text" NAME="State" VALUE="<%=rs("State")%>"><BR>
      <B>ZipCode</B> <INPUT TYPE="text" NAME="ZipCode" VALUE="<%=rs("ZipCode")%>"><BR>
      <INPUT TYPE="hidden" NAME="flag" VALUE="2">
      <INPUT TYPE="hidden" NAME="Recordid" VALUE="<%=rs("ID")%>">
      <INPUT TYPE="submit" VALUE="Update">
      </FORM>
      <%
      rs.MoveNext
      rs.Close
    END IF
  ELSEIF Request.Form("flag")="2" THEN
    SQLstmt = "UPDATE customers SET "
    SQLstmt = (SQLstmt) & "Company='" & TRIM(Request.Form("Company")) & "',"
    SQLstmt = (SQLstmt) & "Contact='" & TRIM(Request.Form("Contact")) & "',"
    SQLstmt = (SQLstmt) & "PhoneNumber='" & TRIM(Request.Form("PhoneNumber")) & "',"
    SQLstmt = (SQLstmt) & "Street=" & TRIM(Request.Form("Steet")) & "'"
    SQLstmt = (SQLstmt) & "City='" & TRIM(Request.Form("City")) & "',"
    SQLstmt = (SQLstmt) & "State='" & TRIM(Request.Form("State")) & "' "
    SQLstmt = (SQLstmt) & "ZipCode='" & TRIM(Request.Form("ZipCode")) & "' "
    SQLstmt = (SQLstmt) & " WHERE ID='" & TRIM(Request.Form("Recordid"))
    %>

    SQL statement: <%=SQLstmt%>

    <%
    Conn.Execute(SQLstmt)
    Response.Write "Operation Complete<br><A HREF=""clients1.asp"">Home</A>"
  END IF

Here is the error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''City='Spart',State='Nj' ZipCode='07871' WHERE ID='22'.
/test/clients.asp, line 87


Reply With Quote