R
Ryan
Quite awile ago I posted to this newsgroup in regards to using Datasets in
my VB 2005 application. About how many Datasets should be used.. a limit to
the number of tables that should be included in a dataset, etc. The
concensus I was given was that one Dataset should be created per logical set
of data, or approximately 1 Dataset per form (usually consisting of 5 or
less tables).
After finishing 2 projects using VB 2005 and DataSets I can emphatically say
it is far easier to design and maintain a single DataSet containing every
table in the database rather than multiple datasets. With multiple
Datasets, when I write new tableadapter queries I either have to save that
query as a stored procedure on the server or I have to rewrite the query for
every dataset that may need it. Overhead with a single dataset also seems
to be negligible because I only populate the datatables only when I need to.
Theres also no logical reason to create a new Dataset per form if what you
need can be attained through the first Dataset, a new instance is created
anyways.
Anyways, just commenting on my experience and maybe someone else can avoid
the trial and error I went through. It seems to me that Microsoft designed
the DataSet object to be an all-encompassing database object. Perhaps my
lack of experience shows so let me disclaim this entire post with the fact
that I went straight from VB 6.0 to .Net 2.0. (missed out on the whole
Visual Studio 2003 .NET thing)
Ryan
my VB 2005 application. About how many Datasets should be used.. a limit to
the number of tables that should be included in a dataset, etc. The
concensus I was given was that one Dataset should be created per logical set
of data, or approximately 1 Dataset per form (usually consisting of 5 or
less tables).
After finishing 2 projects using VB 2005 and DataSets I can emphatically say
it is far easier to design and maintain a single DataSet containing every
table in the database rather than multiple datasets. With multiple
Datasets, when I write new tableadapter queries I either have to save that
query as a stored procedure on the server or I have to rewrite the query for
every dataset that may need it. Overhead with a single dataset also seems
to be negligible because I only populate the datatables only when I need to.
Theres also no logical reason to create a new Dataset per form if what you
need can be attained through the first Dataset, a new instance is created
anyways.
Anyways, just commenting on my experience and maybe someone else can avoid
the trial and error I went through. It seems to me that Microsoft designed
the DataSet object to be an all-encompassing database object. Perhaps my
lack of experience shows so let me disclaim this entire post with the fact
that I went straight from VB 6.0 to .Net 2.0. (missed out on the whole
Visual Studio 2003 .NET thing)
Ryan