views:

281

answers:

1

I need to move data from a datareader into a Farpoint Spreadsheet component in a Windows form. The DataSource of an fps sheet can't be set to a datareader. I don't want to change my app to use ADO just for this purpose.

Right now I'm looping through the query data and pushing it into the sheet cell-by-cell. That's ugly, and I am sure performance will suffer for large datasets (though I haven't tried it yet).

Does anyone here know a better way to get a datareader into one of these components? I'm using VB.NET, but a C# example would be fine.

+1  A: 

I'm not familiar with the product, but you can try loading the reader into a DataTable and binding that if it's supported.

Dim dt as Datatable
dt.load(reader)
rjrapson
That sounds like a good idea. I'll give it a try tonight when I'm looking @ the code again.
JosephStyons
Worked like a charm. Saved me a lot of trouble. Thx
JosephStyons