Les,

Create the variable FIRST using string concatenation or cfsavecontent . If
all the text is going to be text qualified, use the "listqualify() function
to encase it in quotes after you have created the list. You have to
becareful with the commas though they can screw up the number of items in
the list.

for example:

<cfset bigList = ck_company & "," & ck_company & "," & ck_address ....>
(of course using a loop and listappend looks cleaner)

Then...


<cfset BigList = Listqualify(BigList,'"',",",'CHAR')>

(note the CHAR element tells it to NOT qualify numbers. Sort of standard in
a .CSV file format.  If I were doing this I would first build the list with
piping symbols or asterick (something other than commas), then listqualify,
then use changedelimeters to bring it back to commas.  The text qualifies
will be correctly placed then.

-mk







-----Original Message-----
From: Les Mizzell [mailto:lesmizz@;bellsouth.net]
Sent: Tuesday, November 05, 2002 11:49 AM
To: CF-Talk
Subject: cffile output including Quotes


Not 100% sure on this:

Need to generate output like:

"Les Mizzell","Check Testing Company","100
MyStreet","MyCity","NC","22222","123-45-6789","[EMAIL PROTECTED]",...and
more and more

inside a cffile tag. Line above contains close to 50 variables....


<CFFILE ACTION="Write"
  FILE="C:\Inetpub\Files\blah...blah.....
  OUTPUT="

"#ck_company#","#ck_company#","#ck_address#","#ck_city#","#ck_state#","#ck_z
ip#","#ck_phone#","#ck_email#",...and more and more


But obviously all the quotes and perhaps other special characters in the
output file are gonna screw me up...

Suggestions please?

Thanks....





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to