Hi,
The code below should put the 801 charachters into a string for you. Don't
forget to import System.IO.
Dim fs As New FileStream(mstrFilePath, FileMode.Open, FileAccess.Read)
Dim sReader As New StreamReader(fs)
Dim arrChar() As Char
Dim strData As String
sreader.Read(arrChar, (801 * (intRecordNumber - 1), 801)
strData = arrChar
Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"Fred" <Fr**@NoWhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I have a text file that has records in it 801 characters long with | as a
separator between fields in the records (no CRLF between fields). I know I
can use the split method to separate out the data once I've read it in.
But how can I get the data in. It seems like the only thing I can do is read
it in as a byte/char array and then concatenate the values to make a string.
Nothing that returns a string seems to be able to let me specify how much
data to read.
Any suggestions would be greatly appreciated.