Error in statement aparantly...

Results 1 to 2 of 2

Thread: Error in statement aparantly...

  1. #1
    Flimpoid Guest

    Default Error in statement aparantly...

    depid=request.form("ID")<BR>tip=request.form("tip" )<BR>dept=request.form("dept")<BR><BR>set conn=server.createobject("adodb.connection")<BR>co "tip"<BR><BR> sqlstmt = INSERT INTO tips (tip, department, depid)<BR> sqlstmt = sqlstmt & VALUES(tip, dept, depit)<BR><BR> conn.execute(sqlstmt)<BR><BR>_____________________ ___________________________________________<BR><BR >Expected end of statement after the word &#039;INTO&#039; if I remove &#039;INTO&#039; the error moves to the end of the word &#039;INSERT&#039;.<BR><BR>Any ideas?

  2. #2
    Mike Shaffer Guest

    Default RE: Error in statement aparantly...

    To assign a string to a variable, surround it with quotation marks (" "), like this:<BR><BR>sqlstmt = "INSERT INTO tips (tip, department, depid) "<BR>sqlstmt = sqlstmt & "VALUES(tip, dept, depit)"<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts