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

Reading a Text file

P: n/a
Hi,
I know its fairly easy in .NET to read a text file (fixed or
delimited) using a Microsoft Text driver. My question is, is there a
similar easy way to read text files if they have different types of
rows, like a header, detail & footer. The first character on each line
could identify what type of row that is.
I'd hate to think that reading each line is the only answer. Also
if the fields in header and footer are different, can you process them
differently. Ideally, I'd like to create a dataset with 3 tables linked
together, one each for header, detail & footer.

Cheers
Sudhesh

Mar 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Sudhesh schrieb:
Hi,
I know its fairly easy in .NET to read a text file (fixed or
delimited) using a Microsoft Text driver. My question is, is there a
similar easy way to read text files if they have different types of
rows, like a header, detail & footer. The first character on each line
could identify what type of row that is.
I'd hate to think that reading each line is the only answer. Also
if the fields in header and footer are different, can you process them
differently. Ideally, I'd like to create a dataset with 3 tables linked
together, one each for header, detail & footer.

Cheers
Sudhesh


Hello,
i don't think, there is a ready-to-use solution in .Net for this. I
think, that the only way is reading the file line for line and then
parse it into the three tables.

Martin Schall
Mar 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.