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


|