Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > ColdFusion > CFILE and APPEN...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1666 of 1695
Post > Topic >>

CFILE and APPEND

by "Chris \( Val \)" <chrisval@[EMAIL PROTECTED] > May 11, 2007 at 02:30 PM

Hi everyone, I need your help with the following issue:

I am using ColdFusion MX7:
Version  7,0,2,142559 on Windows 2000 Server
--------------------------------------------

I am getting duplicate lines written out to my Re****t.CSV file.

....and here is an example of the code in use:


<!--- First I create the file with its columns written out: --->
<CFFILE action="write" file="D:\Foo\Bar\#OutFile#" output="ColA, ColB,
ColC, ColD, ColE">

<!--- Then I loop through the query and write out the corrosponding
records: --->
<CFLOOP query="ResultsSet">
  <CFSET TextLine = trim(numberformat(x.ColA,-99.999999)) & "," &
                    trim(numberformat(x.ColB,999.999999)) & "," &
                    #ColC# & "," & #ColD#&","&#ColE#>

  <CFFILE action="append" file="D:\Foo\Bar\#OutFile#" output="#TextLine#" 
addnewline="yes">
</CFLOOP>


NOTE: The above query has been checked during its execution, in that
only a certain number of iterations are performed by the loop.

For example, if I print a line of text from within the loop to the page,
i.e: Am here </BR>, I get the correct number of lines printed out as HTML,
which corrosponds to the correct number of records retrieved by the query.

However, the resulting OutFile (re****t.CSV) file produced is twice the
size
with duplicate records in it!

Is this a known bug, and if so, is there a fix for it?

Thanks in advance,
Chris
 




 2 Posts in Topic:
CFILE and APPEND
"Chris \( Val \)&quo  2007-05-11 14:30:56 
Re: CFILE and APPEND
Denard Springle <denar  2007-06-25 16:05:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 0:12:20 CDT 2008.