StreamReader to Dataset using Fixed Length Files

  • Thread starter Thread starter Ruffeo
  • Start date Start date
R

Ruffeo

How do you read in fixed length file using the streamreader class and
input the records into a dataset with the correct field sizes and
names?



Thanks
 
Ruffeo,

I think that you should create a dataset.

Add to that a table with the correct datacolumns.

Than read using the streamreader line by line.

Create for every line a datarow and than add the fields using the right
columnnames as items and the Substring to get the right part of your fixed
lenght records and add that datarow everytime to your datatable..

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top