how to use sqlDataReader with DataGrid

  • Thread starter Thread starter Franky
  • Start date Start date
F

Franky

I want to fill fastest is possible a Datagrid, get data from remote database
include.

So the DataReader if faster than DataSet... BUt How can i use it (fastest
way) for fill my DataGrid?


Thanks
____________________
Franky
(e-mail address removed)
 
The only way I know of is to use the datareader to build a datatable and
bind to it. Behind the scenes, a datareader is used to create a datatable
when you call fill so I'm not sure how much of a performance gain you are
going to see (the methods are roughly equivalent - calling da.fill vs using
a DataReader and creating your own datatable) but you'll have to write some
more code just for filling and the same will hold for updating...moreover
you'll need to come up with a mechanism to handle concurrency unless you
just want to ignore it as an issue (which I'd advise against).

HTH,

Bill
 

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