Jeff Waris wrote: > I loop that query to write each record out to a line in a text file. I use > the code CFFILE ACTION="Append" > > After about 70k it errors out. I get this off the cfcatch variables.
Jeff: I've never run across that problem but it may well be as you suggest... some sort of locking error. There is a more efficient way of doing what you want that would likely resolve any locking issues too. Instead of writing each line to the file separately, build the contents of the file in memory and then write it all out in one shot. Something like: <CFSET CrLf = Chr(13) & Chr(10)> <CFSET Output = ""> <CFLOOP QUERY="myQuery"> <CFSET Output = Output & myQuery.Col1 & "," & myQuery.Col2 & CrLf> </CFLOOP> <CFFILE ACTION="Write" FILE="foo.txt" OUTPUT="#Output#"> -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183368 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54