By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 943 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

read in only first x bytes of text file

P: n/a
I have a text file of a database dump that is over 1 GB in size. I would
like to read just the first x number of rows, I don't care if its 10 or 50
or 100 rows, I just want to see some data to understand the structure,
column delimiters, etc.

can i do this with code?
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "Josh Golden" <jo***@wachovia.com> scripsit:
I have a text file of a database dump that is over 1 GB in size. I would
like to read just the first x number of rows, I don't care if its 10 or 50
or 100 rows, I just want to see some data to understand the structure,
column delimiters, etc.


Take a look at the 'System.IO.StreamReader' class and/or
'System.IO.BinaryReader'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #2

P: n/a
Josh,

In addition to Herfried and than just in a for index loop (all answers are
normaly with a do while or a do until about the streamreaders).

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps?
Cor
I have a text file of a database dump that is over 1 GB in size. I would
like to read just the first x number of rows, I don't care if its 10 or 50
or 100 rows, I just want to see some data to understand the structure,
column delimiters, etc.

can i do this with code?

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.