Have you tried: PreserveSingleQuotes() ? Jim Rising Sr. Cold Fusion Developer ICGLink Inc. www.icglink.com
-----Original Message----- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 18, 2007 10:04 AM To: CF-Talk Subject: cfc question I have a CRUD CFC that has this function and I load the CFC into the application scope: <cffunction name="readZJF" access="public" returntype="query"> <cfargument name="criteria" type="string" required="yes"> <cfquery datasource="dsn" name="readZJF"> SELECT * FROM FlexoDirectConfigFiles WHERE #arguments.criteria# </cfquery> <cfreturn readZJF> </cffunction> I want to be able to pass in the "WHERE" statement into it. So it could be: FileName = 'PLATES.zjf' AND FileModificationDate = '09/30/2005 12:34:01 PM' So I run something like this to call the function: <cfset DoesFileAlreadyExist = application.ZJF.readZJF("FileName = '#getZJF_files.name#' AND FileModificationDate = '#getZJF_files.dateLastModified#'")> What I get back is an error: [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near 'PLATES.zjf'. Then I look at the SQL that was run in debugging. SELECT * FROM FlexoDirectConfigFiles WHERE FileName = ''PLATES.zjf'' AND FileModificationDate = ''09/30/2005 12:34:01 PM'' Why did it take my single quotes and add another single quote? Is it trying to escape the single quote? How do I keep it from doing this? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283992 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4