I have a text file that i have to read and insert into a database table. The
files has over 30 lines of data in it, I need to start inserting data from
line 8 in the file. How can I start inserting the data from line 8 of my tex
t
file? So from line 1-7 are read only (headers) and starting with line 8 need
s
to be inserted into the table.Hi,
you could use StreamReader which has ReadLine method. You could use it to
skip the first 8 lines, and then go about teading it line by line.
StreamReader.ReadLine
http://msdn.microsoft.com/library/d...adLineTopic.asp
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"CsharpGuy" <CsharpGuy@.discussions.microsoft.com> wrote in message
news:15EBF9C2-7859-4EEF-A33E-8A64131ABCCC@.microsoft.com...
>I have a text file that i have to read and insert into a database table.
>The
> files has over 30 lines of data in it, I need to start inserting data from
> line 8 in the file. How can I start inserting the data from line 8 of my
> text
> file? So from line 1-7 are read only (headers) and starting with line 8
> needs
> to be inserted into the table.
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment