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.