I have simple code that, using a query, creates a .txt file and downloads to the browser. My query is about 20k records and it creates the .txt file fast and well. Is there a better way to create a txt file using a query?The way I'm doing it seems old school, since I got it from article from 2008. I'm using coldfusion 9.<cfsetting enableCFoutputOnly = Yes>    <cfsaveContent variable = myCSV>    <cfset newline = #chr(13)#&#chr(10)#>    <cfoutput>testing_one | testing | testingthree #newline#</cfoutput>    <cfoutput query=qGetAllclients>'#testing_one#|#testing#|#testingthree#</cfoutput>    </cfsaveContent>    </cfsetting>    <cfoutput>            <cfheader name=Content-Disposition value=attachment; filename=testing.txt />            <cfcontent type=text/plain reset=true variable=#ToBinary( ToBase64( myCSV ) )# />    </cfoutput>
Creating a text file from cfsavecontent
coldfusion;cfml