Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I open large Textfiles!

Status
Not open for further replies.

Maetu

Programmer
Nov 18, 2002
7
0
0
CH
Hi everybody!

I'm opening a textfile and reading from it with the following lines:

<CFFILE ACTION=&quot;READ&quot; FILE=&quot;File&quot; VARIABLE=&quot;List&quot;>

<CFLOOP INDEX=&quot;fLine&quot; LIST=&quot;#List#&quot; DELIMITERS=&quot;#CHR(13)# #CHR(10)#&quot;>

As long my file will not overstep 2 MB everything works fine.... If they are larger the server will be overloaded....

Now: How can I read a file over 2 MB? Can I read it sequential?

Note: The Server has 1GB of Memory, so I don't understand why he can't handle this!

Thanks 4 your help

Mätu
 
Have you tried using a text DSN?

Don't know if it'd be any better at handling text files that size... but it'd be worth a shot. I dunno... I've never had a text file that was that large ;-)


-Carl
 
If you are using CF MX, try CFBufferedReader, which you can find at macromedia.com (go to the DevNet and search for it). It's a great example of how to use Java in ColdFusion.

Another thing to try is a user-contributed CFX tag called FileReadLines. This tag allows you to read any number of lines (or even a single line) at a time. There are probably other CFX tags that do something similar. It used to be on Allaire's website, but I couldn't find it on macromedia.com. If you want to try it, I can send it to you (it's freeware).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top