----- Original Message -----
From: Eli Shechter <[EMAIL PROTECTED]>
Subject: cffile from query
> Hi
>
> i am trying to get info from a database and put it into a text file.
> i was trying to use cffile but i dont want to run cffile for every record
> example:
> <cfoutput query="myQuery">
> <cffile action="WRITE"
> file="#Application.LocalServer#emails.txt"
> output="#me#">
> </cfoutput>
>
> i figure there has got to be a way to make a text file with a lot of
> records, without appending everyone individually to a text file
>
> Thanx
>
> -Eli-
Hi Eli,
I am doing a similar thing and am <CFFILE> ing every record, about 500 of
them, and it works very quickly (less then 1 second) on my local machine. I
also have a bunch of static data that I write with a single <CFFILE> after
building the variable in <CFSRIPT> using chr(10) to start at a new line when
required.....
<CFSCRIPT>
myData = "this is some stuff" & Chr(10);
myData = #myData# & "this is some more stuff on next line" &Chr(10);
myData = #myData# & "and even more stuff on next line" &Chr(10);
</CFSCRIPT>
<CFFILE ACTION="APPEND" FILE="#outFile#" OUTPUT="#myData#" ADDNEWLINE="Yes">
Hope this helps more then hinders.
Regards,
Mark.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.