Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
Efused #1
Create text file from query
I wantto create a simple text file from the requlsts of a query, but I can't
seem to escape thequotes right.
I am trying to run...
<cfset ScrollerXML ="
<cfoutput query='GetRates'>
<country pkey="#CountryID#" scroller="#OnScroller#"
rate="#CountryRate1#">#CountryName#</country>#chr(10)#
</cfoutput>
">
To give me a file that looks like:
<country pkey="1" scroller="1" rate=".50">USA</country>
<country pkey="2" scroller="0" rate=".75">GB</country>
<country pkey="3" scroller="1" rate="1.50">USSR</country>
how do I run that query insdie the <cfset> tag?
Efused Guest
-
Coldfusion to create a PDF file from a query
I use Coldfusion to create a PDF file from a query. Everything works fine, except that my PDF file only shows the first record from my query. If I... -
text file to query using cfhttp
Did you ever find out what causes this issue? It's happening to me now... String index out of range: -1 Same situation, only I'm using a single... -
Create a table regarding a text file
Hello, I have this .txt file : Roger|tow25$rank259 Isabelle|tow36$rank24 Pascal|tow12$rank29 Sergeď|tow45$rank5 Michel|tow1245$rank45478... -
Create text file from CD-ROM projector
Hi, You need to write the file to a temporary location on the user's hard disk and then open that file to print.... Vj -
Cannot create a text file
I have a simple guestbook application which writes all the entries made on the guestbook on a text file which I save at... -
SafariTECH #2
Re: Create text file from query
try using CHR(34) instead fo the quotes in the actual output
I also don't think running a loop inside a variable assignment will properly
work.
Try creating the variable and concatenating within the loop rather than the
opposite.
... then when done save the final variable result to a file using CFFILE
<cfset txtdata = "">
<cfoutput query='GetRates'>
<cfset txtdata="#txtdata#<country pkey=#CHR(34)##CountryID##CHR(34)#
scroller=#CHR(34)##OnScroller##CHR(34)#
rate=#CHR(34)##CountryRate1##CHR(34)#>#CountryName #</country>#chr(10)#">
</cfoutput>
SafariTECH Guest



Reply With Quote

