This content has been marked as final. Show 15 replies
> Any thoughts?
Show some code.
I've never had #chr(13)#&#chr(10)# ignored when they where not supposed
to be ignored.
So without seeing your code, I don't have time to imagine what you could
possible be doing that is so different then the expected way things are
Please post your code.
Here you go:
<cfloop index="idx" from="1" to="#getFields.recordcount#">
<cfoutput> #Trim(getFields.email[idx])#|#Trim(getFields.firstname[idx])#|#Trim(getFields.lastname[id x])#|#Trim(getFields.postalcode[idx])#|#Trim(getFields.campaign[idx])#|#DateFormat(getFiel ds.firstordd[idx],'MM/DD/YYYY')#|#getFields.firstordamt[idx]#|#DateFormat(getFields.lastor dd[idx],'MM/DD/YYYY')#|#getFields.lastordamt[idx]#|#getFields.htdordcnt[idx]#|#getFields.h tdordtot[idx]#|#getFields.annualordcnt[idx]#|#getFields.annualordtot[idx]##Chr(13)##Chr(10 )#
> Here you go:
Nothing *obviously* out of place there, before I go digging hard, define
'ignored'. How are you experiencing these returns being ignored?
Well, simple, I want my data to be put into the file in the format:
But my code is generating my data like this:
As you can see the line is not braking.
Thank a lot Ian!
What application are you using to view the generated file?
I just dumped my variable into the browser, you know the variable that contains the data.
A web browser will usually not display a line break as a line break, it expects a <br> tag instead.
If you save your fileContent variable to a text file using CFFILE and open this file in a text editor does your content look as expected?
> But my code is generating my data like this:
JR Bob Dobbs wrote:
> What application are you using to view the generated file?
To leap forward a bit on where I was trying to lead you and JR caught on
to, *IF* you are looking at your data in a browser as HTML that is what
you are going to see.
HTML - by definition - ignores line feeds and carriage returns and most
other white space characters. So if that is the case, your output is
probably exactly correct and is behaving as it should for the way you
are viewing it.
*IF* that is what you are seeing in the file once it is written and you
view it with some simple text editor or in some manner that does not
ignore white space, then yes, you have some strange behavior going on.
You are so right JR! I got it!
Thanks Ian and JR!
> I just dumped my variable into the browser, you know the variable that contains the data.
I just replied that if you do this, that is how your data is going to
look. HTML by definition ignores line feed and carriage returns.
You need to dump your variable between a set of <pre>...</pre> tags that
tell HTML to *not* ignore these characters OR write the file out and
look at it that way.
Ok, guys, so let met change the question.
The generated file is 30 megabytes, 300,000 lines.
I need to ftp it and I got the exception:
'putFile operation exceeded timeout'
Have you run into something similar? I already have this: <cfsetting requesttimeout="532000">
I'd use the export tools designed for my database rather then CF for creating large files or doing other work with large numbers of records.
For example Microsoft SQL Server includes the "Integration Services" feature for this kind of use.
Thank you JR and Ian!
I appreciate your time and kindness!