Remove the quotes from around "addressbook" ... no need to quote your table
you're selecting from.

H.


> -----Original Message-----
> From: Kevin Bridges [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 1:37 PM
> To:   CF-Talk
> Subject:      RE: newbie school of hard knocks
> 
> Your passing in quotes or single quotes as data and need to escape them
> ...
> using cfqueryparam around your data is a good way of doing so
> 
> -----Original Message-----
> From: Mike Miessen [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 03, 2003 2:31 PM
> To: CF-Talk
> Subject: RE: newbie school of hard knocks
> 
> I am getting the following error but I don't know what is wrong with my
> statement can you point out the error of my ways?
> 
> The error I get is;
> 
> Syntax error or access violation: You have an error in your SQL syntax
> near ''addressbook' WHERE FirstName = 'Mike' AND LastName = 'Miessen''
> at line 2  
>   
> The Error Occurred in
> D:\wwwroot\BlueGrassPro\datasources\emailformaction.cfm: line 8
>  
> 6 :     WHERE FirstName = '#Form.firstname#'
> 7 :   AND LastName = '#Form.lastname#'
> 8 :   </cfquery>
> 
> 
> 
> My code is this;
> 
> <HTML>
>     <HEAD>
>       <cfquery name="DupCheck" datasource="#myDSN#"
> username="#DSNusername#" password="#DSNpassword#">
>     SELECT COUNT(*)
>     FROM 'addressbook'
>     WHERE FirstName = '#Form.firstname#'
>       AND LastName = '#Form.lastname#'
>       </cfquery>
> 
>               <CFOUTPUT>
> 
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to