Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Posts
    3

    Unanswered: '80040e14' Syntax Error (Missing Operator) error

    Hey all,

    I'm getting an error when trying to use a DELETE query to remove data
    (ProductID & UserID) from a table I call Wishlist. The UserID is actually
    the user's session ID, and the ProductID is the selection they've marked for
    deletion on an ASP page.

    My query is:

    strSQL = "DELETE FROM Wishlist WHERE (UserID, ProductID) VALUES(" &
    Session("ID") & ", " & SQLFixUp(Trim(Request("ProductID")(i))) & ")"

    I'm constantly getting the following error, and from what I've read, it
    may have something to do with quotes?

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
    query expression '(UserID, ProductID) VALUES(2930, 10)'.

    wishlist-remove.asp, line 14

    Any ideas?

    Mark B

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191

    Re: '80040e14' Syntax Error (Missing Operator) error

    Originally posted by Linger1974
    Hey all,

    I'm getting an error when trying to use a DELETE query to remove data
    (ProductID & UserID) from a table I call Wishlist. The UserID is actually
    the user's session ID, and the ProductID is the selection they've marked for
    deletion on an ASP page.

    My query is:

    strSQL = "DELETE FROM Wishlist WHERE (UserID, ProductID) VALUES(" &
    Session("ID") & ", " & SQLFixUp(Trim(Request("ProductID")(i))) & ")"

    I'm constantly getting the following error, and from what I've read, it
    may have something to do with quotes?

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
    query expression '(UserID, ProductID) VALUES(2930, 10)'.

    wishlist-remove.asp, line 14

    Any ideas?

    Mark B
    Maybe I'm just old fashioned, but I don't understand your query at all... I would instead do this...

    strSQL = "DELETE FROM Wishlist WHERE UserID =" & Session("ID") & " AND ProductID='" & SQLFixUp(Trim(Request("ProductID")(i))) & "'"

    Perhaps this will work better for you.

    Tim
    Tim

  3. #3
    Join Date
    May 2003
    Posts
    3

    Re: '80040e14' Syntax Error (Missing Operator) error

    Originally posted by MrWizard
    Maybe I'm just old fashioned, but I don't understand your query at all... I would instead do this...

    strSQL = "DELETE FROM Wishlist WHERE UserID =" & Session("ID") & " AND ProductID='" & SQLFixUp(Trim(Request("ProductID")(i))) & "'"

    Perhaps this will work better for you.

    Tim
    Hi Tim,

    Thanks for the reply. I used your suggestion successfully. Thanks so much for your time!

    Regards,
    Mark

  4. #4
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    Looked like an INSERT query but with a few bits changed....

Posting Permissions

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