473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Vb .net - To Read Big Text File (1gb)

HI ALL,

I AM DOING A PROJECT IN SEARCHING A STRING IN A BIG TEXT FILE(ie. 1GB). IT IS TAKING TOO MUCH TIME TO SEARCH AND WRITE IT INTO ANOTHER TEXT FILE.

I AM READING LINE BY LINE. I HAVE TO SEARCH FIVE STRING.
Jun 7 '07 #1
1 3356
HI ALL,

I AM DOING A PROJECT IN SEARCHING A STRING IN A BIG TEXT FILE(ie. 1GB). IT IS TAKING TOO MUCH TIME TO SEARCH AND WRITE IT INTO ANOTHER TEXT FILE.

I AM READING LINE BY LINE. I HAVE TO SEARCH FIVE STRING.
you can open the TXT file as Binary. then you put it into multi part (string) this means you should work with new functions... after all you join them in a string.
if you make the
Expand|Select|Wrap|Line Numbers
  1. Textbox.Visible = False
it'll be faster. after it opened it make it visible. ;)

The fastest code is:
Expand|Select|Wrap|Line Numbers
  1. FileOpen(1, "C:\test.txt", OpenMode.Input)
  2. TextBox1.Text = InputString(1, FileLen("C:\test.txt"))
  3. FileClose(1)
Jun 8 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Mike | last post by:
I need to be able to pull the current <Title> tag from the header into the body of the html page. We started coding this with php, and we were able to get it working. However the entire page is...
6
by: Bennie | last post by:
Hi, I have a problem with ZipFile. It works okay untily I come across a file that is greater then 1Gb. Then it exit with the error: OverflowError: long int too large to convert to int How...
3
by: Jcons | last post by:
I'm looking for a set of functions that will allow me to work with a 1Gb+ file without loading the whole thing into memory. Anyone have any ideas Thanks in advance for help -J
3
by: Johnny | last post by:
Hello all, I have a 1GB XML file that I need to read once a day and I would like to get feedback to find out what is the most efficient way to go about reading this file. The application reading...
2
by: kuhni | last post by:
Hi everybody! After searching newsgroups for a couple of hours, I now try asking directly (running the risk of asking again the same question). My problem is to predict when the size of the...
0
by: py | last post by:
i need to read the contents of a file (could be 100kb, could be 500mb, could be 1gb)...but I want to allow the read to be canceled. for example, say a user wants to savea file...as it's saving...
0
by: cbianchi | last post by:
Hi, I just received a file with demographic data, almost 1GB of text. The issue is, there are no column delimiters, all the informaton is in one single row. I know where the data of intetest...
4
by: loopz123 | last post by:
HI ALL, I AM DOING A PROJECT IN SEARCHING A STRING IN A BIG TEXT FILE(ie. 1GB). IT IS TAKING TOO MUCH TIME TO SEARCH AND WRITE IT INTO ANOTHER TEXT FILE. I AM READING LINE BY LINE. I HAVE TO...
2
by: MikeJ | last post by:
Hi all.... I need to work with large text files....i know there is a lot of ways under net to work with them.... i want speed, High Percentage of correctness so i was thinking ...but not sure...
4
by: thiago777 | last post by:
I have only 1GB of RAM so I cannot work with files too big with the ReadtoEnd method. Here is the code Im trying so that the file would split in pieces of 256MB: Try Dim BInput...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.