Experiences with DataReader \ DataSet \ Custom Strongly Type DataSet

Experiences with DataReader \ DataSet \ Custom Strongly Type DataSet

Post by Donal McWeene » Fri, 26 Jul 2002 22:32:38

Hi Folks,

I've been reading a lot about the DataReader v DataSet v Strongly Typed
DataSet and am probably more confised that when I started. I suppose this
question really revolves around design patterns that work for production
applications. Typically for handling individual data records which may have
one to two sets of child records and all database access and updates will be
done via stored procedures.

Eg1. Individual User Record and a number of User Preference records.

Eg2. An Order Record with a number of Order Line Item records

Originally I was looking at using the DataReader to execute a stored
procedure which would issue a number of select statements for me. I would
then populate a class(s) with the field values from the data reader. However
the datareader handling of record counts and missing records does not seem
to be the best so it has kindof put me of the DataReader.

I was also looking at the DataSet and it obviously has its advantages and
disadvantages over the datareader. The strongly types data-set is close to
what I am looking for methinks but needs some more interfaces and methods.

Then I was thinking of using a customized version of the strongly typed
dataset which would be hand-built. Obviously this would take more work but
would be customized to the task at hand and maintainable as required.

So some questions:

-          what approach do other people use for managing database records
of this type

-          is it best to programmatically build the dataset schema or fill
it from an XML file.

Any thoughts or experiences greatly appreciated.




Experiences with DataReader \ DataSet \ Custom Strongly Type DataSet

Post by Luke Zhang [M » Sun, 28 Jul 2002 19:38:04

I think a typed Dataset will be the best choice for you. You can add
Constraints and relationships in the Datatables to manage your business


(This posting is provided "AS IS", with no warranties, and confers no


Experiences with DataReader \ DataSet \ Custom Strongly Type DataSet

Post by Donal McWeene » Tue, 30 Jul 2002 19:18:07

Thanks Luke...

I'm kindof heading in that direction, but putting a wrapper class around it.



1. Strongly typed dataset - can't find strongly typed row type


I'm using a strongly typed dataset.  When iterating thru the rows
collection, i would prefer to use the strongly typed row data type,
instead of using system.data.datarow.  It doesn't seem to be available
from intellisense, but it compiles correctly and it is a public class.

Is this a vs.net bug?


2. How to generate Markers in TOC

3. Strongly typed CUSTOM Dataset DBNull handling vs generated dataset

4. Visioeer 5800 Other software

5. Major Problem downcasting from DataSets to Strongly typed datasets across dlls

6. Palm DOC question.

7. Problem Casting from Dataset to Strongly Typed Dataset

8. OO Question on DataSet and Strongly Typed DataSet

9. Strongly typed DataTable with loosely typed DataSet

10. Typed DataSet,Generic DataSet,Custom business objects,XML String

11. Strongly Typed DataSets

12. Strongly Typed Dataset