Mike, if you use CFQUERYPARAM, you needn't worry about quotes. 
Besides, it's a good practice to get into...more work, but better in
the long run.

Pete

On 3/3/06, Mike Kear <[EMAIL PROTECTED]> wrote:
> Jim it looks like you're on the right track now.    Something you
> might like to know about - it drove me crazy when I first started
> using SQLServer till i got the hang of it,  one of the things SQL
> Server is really finicky about is putting single or double quotes
> around the values in the queries.  You need to make sure you have the
> syntax exactly right.   I sometimes work out the query in query
> manager first,  so i dont have coldfusion issues before I've figured
> out the exact query I need to send.
>
> For example:
>
> <cfset name="Kear" />
>
> <cfquery name="query1" datasource="#request.dsn#">
>  SELECT  name,address,city,state
>  FROM users
>  WHERE name = '#name#'
> </cfquery>
> (i.e. with single quotes around the variable #name#)
>
> is not the same as
>
> <cfquery name="query2" datasource="#request.dsn#">
>   SELECT  name,address,city,state
>   FROM users
>   WHERE name = "#name#"
> </cfquery>
> (i.e. double quotes on the variable #name#)
>
> In the first case,  with the single quotes,  it's going to match
> records where the column 'Name" has a value of "Kear".   In the second
> example, the double quotes tell SQLServer it's a column name.    So
> that query wants it to find records where the value of the column
> "Name" is the same as the value in the column "Kear".   If there isnt
> a column called "Kear" it'll throw an error.
>
>
>
> Cheers
> Mike Kear
> Windsor, NSW, Australia
> Certified Advanced ColdFusion Developer
> AFP Webworks Pty Ltd
> http://afpwebworks.com
> ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
>
>
>
> On 3/4/06, Jim Louis <[EMAIL PROTECTED]> wrote:
> > I found out from the ISP that there is not table LC_Feature on this 
> > database that was sent.
> >
> > So I will have to wait for the other hosting company to send me a valid 
> > backup.
> >
> > Thank you all for your help
> >
> > Jim Louis
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234196
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to