ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 14th, 2009, 07:25 AM
bohemia bohemia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 1 bohemia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 50 sec
Reputation Power: 0
Syntax error (missing operator) in query expression

I've seen a few similar threads, but I can't quite figure this out.

I get

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'CUST.UNIQ_CUST_ID='.
/nexus/cst_detail.asp, line 56

Code:
' Create an empty recordset object
Set rst = Server.CreateObject("ADODB.Recordset")

' Create the SQL statement and stick it in varSQL
varSQL = "SELECT CUST_CNTCT.LAST_UPDT_ON_DT, CUST_CNTCT.SOURCE_NM, CUST_CNTCT.FIRST_NM, CUST_CNTCT.LAST_NM, CUST_CNTCT.TITLE_NM,  " & _
 		"CUST_CNTCT.EMAIL_ADDR, CUST_CNTCT.COMP_EMAIL_ADDR, CUST.* " & _
		"FROM CUST_CNTCT INNER JOIN CUST ON CUST_CNTCT.UNIQ_CUST_ID = CUST.UNIQ_CUST_ID " & _
		"WHERE CUST.UNIQ_CUST_ID=" & session("cust_id")
' Fill the recordset with records based on the SQL statement in varSQL
set rst = Conn.Execute(varsql)



The last line is the offending one,
I have the exact same page elsewhere that works; only except it's a number instead of a name. both are treated as strings, not integers.

What could cause this? only difference I see is that my data in field UNIQ_CUST_ID has spaces in it.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Syntax error (missing operator) in query expression


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap