Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Dataset vs Collection Class

I have written some code in VB.NET which pulls about 20,000 records from a DB2 table and then populates an excel sheet. I am using a dataset which I am passing around to the various procedures.

When I populate the excel sheet, I simply loop thru the dataset record by record/column by column and insert each row into the sheet. This works fine, but it takes a long time. When I used to code in VB6, I would create a collection class which would be a mirror image of the data in the table, pass that around and use that to populate the excel sheet.

Is there anyway I can just dump the entire dataset into excel and not have to worry about looping thru each row?

Any suggestions?
[707 byte] By [Ravman] at [2007-11-11 7:14:54]
# 1 Re: Dataset vs Collection Class
You might consider using this method: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q246335
Phil Weber at 2007-11-11 17:27:10 >