If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > '80040e14' Syntax Error (Missing Operator) error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-28-03, 16:00
Linger1974 Linger1974 is offline
Registered User
 
Join Date: May 2003
Posts: 3
'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
Reply With Quote
  #2 (permalink)  
Old 05-28-03, 16:37
MrWizard MrWizard is offline
Registered User
 
Join Date: Mar 2003
Location: Atlanta, GA
Posts: 191
Re: '80040e14' Syntax Error (Missing Operator) error

Quote:
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
Reply With Quote
  #3 (permalink)  
Old 05-28-03, 17:08
Linger1974 Linger1974 is offline
Registered User
 
Join Date: May 2003
Posts: 3
Re: '80040e14' Syntax Error (Missing Operator) error

Quote:
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
Reply With Quote
  #4 (permalink)  
Old 05-31-03, 05:41
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 441
Looked like an INSERT query but with a few bits changed....
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On