Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax error

Status
Not open for further replies.

ringadeal

Technical User
Jan 16, 2008
67
US
What is wrong with my syntax that is bringing the following error message?:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC Microsoft Access Driver] Syntax error in string in query expression '(productid_img = 197 OR ProductFam=1) OR subfam=10 AND (ColoursAtt1 <> ") ORDER BY sort_img_prd DESC'.

 
(ColoursAtt1 <> ")

possibly should be

(ColoursAtt1 <> '')

That is, should be two single-quotes, not one double-quote
 
Hi,
also, tho not a syntax issue, be careful when mixing ANDs and ORs to be sure your parens correctly control the order of interpretation.




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top