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
 
Back
Top