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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Break apart Text Files into pages

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am new to VB!

I would like to read a text file of any size and break up that into Pages, ie page 1,2,3 depending on the # of lines in the file.(66 lines per page).

Then when I have all the pages separated, I want the ability to append these pages again to the file again. However, I woud like to number all the pages.

For example, if the original file has 8 pages in total, i want the ability to add the same 8 pages to my file any number of times. I know this makes no sense, I want to create large files to test the ability of a program to accept large files, ie thousand or millions of pages.

dhalleran@yahoo.com

thanks
 
I'm not sure why you would want to test the concept rather than just "doing it". Check the MSDN documentation regarding the limitations of the variable types.

The upper limit for the long variable type is the number of pages your program can handle. Check the physical and virtual memory of the computer. Basically, this is the limit to how much data you can deal with at one time in your program.

Visual basic controls have their own limitations. You can only load about 32kb of a file into a text box but you can load a file many times that size into a Rich Text control.

"Trillions" of pages is not unreasonable... you just have to use common sense and not try to load all of your data into memory at one time. There really isn't much to test here. If you try, you won't be testing your program so much as you will be testing the physical and virtual limitations of your test machine.

The question is as arguable as the question "How much RAM can Windows handle?". The question will never be answered because nobody is willing to build a system with several terabytes of memory just to find out. 'twould be a bit expensive.
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top