cfqueryparam?

>Hi,
> 
>I have a query on which I'm doing a query of queries to find specific
>values.  One of my values has a single quote in it.  When I dump the query,
>I can see the value with the single quote.  But when I do a Q of Q on it to
>find the specific record based on a string comparison, I get zero results.
>I've tried using preserveSingleQuotes() around the value, and even tried
>replacing the value's single quote with two single quotes, but I can't find
>the right combination to get it to work.  Either I get zero results, or a
>ColdFusion "error executing database query" (query of queries syntax error)
>which is actually kind of funny since it's not really a database query
>anyway.  But that's beside the point.
> 
>Anyway, here is my sample code to show you what's happening.  If anyone can
>figure this one out, I would greatly appreciate it.  I must be "forgetting"
>something simple!
> 
><cfset qDave = queryNew("mystring")>
><cfset queryAddRow(qDave)>
><cfset querySetCell(qDave,"mystring","This is Dave's test.")>
><cfset sSearchString = "This is Dave's test.">
><cfdump var="#qDave#">
><cfquery dbtype="query" name="q">
> SELECT *
> FROM qDave
> WHERE mystring = '#sSearchString#'
></cfquery>
><cfdump var="#q#">
> 
>TIA!
> 
>Dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270121
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to