Binding SqlDataReader to webcomponents

M

me

Why is SqlDataReader not present in visual studios Toolbox->Data where
I find components like DataSet? Most examples in books and in vs.net
are based on datasets but using disconnected tables seems a bit
heavyweight for most purposes. I there some particular reason to stay
away from sqldatareader??
I have managed to bind components using sqldatareader but digging up
the
information was quite hard.
 
M

Mark Jen [MSFT]

There is no particular reason to stay away from SqlDataReader. IMHO, I
always use SqlDataReader if I have controls that cause autopostback because
using DataSet causes my ViewState to become extremely large. If you are
simply querying a database and spitting the results straight into a control
without doing any processing, then I would recommend SqlDataReader. If you
want to manipulate the data post-query (sort, filter, etc.), then DataSet
would be the way to go.

HTH,
Mark Jen [MSFT]
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top