you should loop through it within the confines of a cfsavecontent tag and
then take that variable that cfsavecontent creates, and dump that to the csv
file.

dumbed down example:

<cfquery name=get>

<cfsavecontent variable="getResults">
<cfloop query="get">
<cfoutput>
#stuff1#,#stuff2#
</cfoutput>
</cfloop>
</cfsavcontent>

<cffile output="#getResults#" action="">
this should paint a better picture of what you want...

tw

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 11:09 AM
To: CF-Talk
Subject: Writing cfoutput to a text file

I am trying to dump a query to a text file..
I tried using <CFFILE but I get an error saying

Object type cannot be written to file. Error attempting to write non
string/binary data to file.
The error occurred while processing an element with a general identifier of
(CFFILE), occupying document position (91:1) to (91:114) in the template
file D:\wwwroot\advantage\eCount\GenerateFileManually.cfm.

Am I doing something wrong?


****************************************************************************
**************
The information contained in this message, including attachments, may
contain
privileged or confidential information that is intended to be delivered only
to the
person identified above. If you are not the intended recipient, or the
person
responsible for delivering this message to the intended recipient, ALLTEL
requests
that you immediately notify the sender and asks that you do not read the
message or its
attachments, and that you delete them without copying or sending them to
anyone else.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to