Yes, I have been concerned about my data access strategy, but I had
not progressed to this point in my design stage yet.
I do have a little bit of confusion on this subject of DataSet vs
DataReader. Here's what I think I know:
- With a DataSet I populate it, it's in memory, and I perform a
databind with a control. Works well, but I'm uncertain just how many
times the data structure is duplicated.
- With a DataReader, based on what i have read since reading your
e-mail yesterday, I create it and use it to populate a control, and
then I close the DataReader. It would seem clear that I'm only
getting one copy of the data in this scenario.
My question is this, is there no mechanism in which the control can
have a an open connection to the database, such that the control
(let's say a list view) can only have in memory the records that it
needs to display? In other words, if there is a 1000 row table that a
list view is going to allow the user to view, that only the 10 or so
that are currently in view would be loaded into memory? I ask this
because, as I went to bone-up on the DataReader this is what I was
expecting to find. Instead, I found something that would seem to be
no better than a DataSet provided that the data in the dataset wasn't
being duplicated.
DataReader = 1 loading of 1000-row table data
DataSet = 1 loading of 1000-row table data *but, when I set a control
to databind, am I in effect duplicating the data structure?