This is a test i did where a put a string with #'s in a text file and them read the text file into a variable, much like you are doing with a query. the only thing that is different is that i escaped the #'s inside the replacenocase function. See if this helps you out.
test.txt ======== This is # a # test ## index.cfm ========== <cffile action="READ" file="C:\Inetpub\wwwroot\test\test.txt" variable="myXML"> <cfoutput>#myXML#</cfoutput><br> <cfoutput>#ReplaceNoCase(myXML, "##", "####", "ALL")#</cfoutput> Resulting Output ================ This is # a # test ## This is ## a ## test #### Anthony Petruzzi Webmaster 954-321-4703 [EMAIL PROTECTED] http://www.sheriff.org -----Original Message----- From: Douglas Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 12:15 PM To: CF-Talk Subject: Re: escaping characters Why not just do <cfset SOURCETAPENUMBER = "CR##1-12"> "Success is a journey, not a destination!!" Doug Brown ----- Original Message ----- From: "Jeffrey Bonnell" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 9:05 AM Subject: escaping characters > My situation is this: (please help) > > I am pulling in an XML document through WDDX and assigning the result of a particular fieldname to an element within my two-dimensional array (all the data that is generated is dynamic - no way to hardcode the escaping character). > > <cfset arrClip[#counter#][5] = #SOURCETAPENUMBER#> > > When trying to do this i get an "Unknown exception error." > > So i conducted a little test to see if i could get around this, but using the Replace function. > > <cfset SOURCETAPENUMBER = "CR#1-12"> > <!--- which is dynamic, but for example purposes, hardcoded.---> > > <cfset temp = Replace(SOURCETAPENUMBER,"#","##","ALL")> > > Invalid parser construct found on line 10 at position 18. ColdFusion was looking at the following text: 1 > > The error seems to arise from just the declaration of the of the string ("CR#1-12") to the variable (SOURCETAPENUMBER). Need some sound advice. Is there a custom tag that will escape all CF special characters? or a different way to handle this situation. > > Thanks for any help. > Dan > > __________________________ > Daniel Spindler > Senior Web Architect > Michael J. Motto Internet, L.L.C. > www.mjmi.com > (908)665-2500 ext. 138 > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists