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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operat

Status
Not open for further replies.

omerdurdu

Programmer
Joined
Jul 21, 2001
Messages
72
Location
TR
Hello Can someone help me about this error message:
ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'CI.Citation_ID = 323'.


Here is the query I had problem:
<cfif action2 neq &quot;&quot;>
<cfswitch expression=&quot;#action2#&quot;>
<cfcase value=&quot;Edit Current Citation&quot;>
<cfquery datasource=&quot;datacat&quot; name=&quot;data1&quot;>
SELECT CI.Citation_ID, ID.Dataset_ID, CI.Originator_Names, CI.Publication_Date, CI.Publication_Time, CI.Title, CI.Edition, CI.Presentation_Form, CI.Series_Name, CI.Issue_Identification, CI.Publication_Place, CI.Publisher_Name, CI.Other_Details, CI.Online_Linkage
FROM CI LEFT JOIN ID ON CI.Citation_ID = ID.Citation_ID
where CI.Citation_ID = #URL.Citation_ID#
</cfquery>
<cfoutput query=&quot;data1&quot;>
'
;
'
'

'
</cfform>
</cfcase>
</cfswitch>
</cfif>
 
this isn't the answer to your problem but will help to identify where the error is. If you copy the parsed version of your query (Without the #URL.Citation_ID#) and open your access database, open the query designer, and then the SQL view and paste your code here. now run this code. Access will not tell you what the problem is but will usually highlight where in the query the problem resides !

 
It appears that your message points to the 'where clause'; so, I would say you are experiencing data type missmatch.

If CI.Citation_ID is text, you should then enclose #url.citation_ID# within quotes

where CI.Citation_ID = '#URL.Citation_ID#'

Regards;

josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top