What is the best dataset approach in a database application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am just wondering what is better and what is the general accepted method of using a dataset. In my wannabe application I am creating agains a db, I guess like most apps, with a lot of different forms. My question is what is better, create different datasets for each different occasion or create a big dataset with all the tables in it, which can be loaded with different data adapters. The benefit of this is that you can make a more generic approach for the datahandling. Drawback I guess is that the dataset could be come realy big. Or maybe this is all nonsens, I do not know.... A second question here would be is there a code you can write to clear out single table in a dataset

Thanks in advanc

David J
 
Hi,
I am just wondering what is better and what is the general accepted method of using a dataset. In my wannabe application I am creating agains a db, I guess like most apps, with a lot of different forms. My question is what is better, create different datasets for each different occasion or create a big dataset with all the tables in it, which can be loaded with different data adapters. The benefit of this is that you can make a more generic approach for the
datahandling. Drawback I guess is that the dataset could be come realy big. Or maybe this is all nonsens, I do not know.... A second question here would be is there a code you can write to clear out single table in a dataset?

".NET Data Access Architecture Guide"
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dnbda/html/daag.asp
 
David J said:
Hi,
I am just wondering what is better and what is the general accepted method
of using a dataset. In my wannabe application I am creating agains a db, I
guess like most apps, with a lot of different forms. My question is what is
better, create different datasets for each different occasion or create a
big dataset with all the tables in it, which can be loaded with different
data adapters. The benefit of this is that you can make a more generic
approach for the datahandling. Drawback I guess is that the dataset could be
come realy big. Or maybe this is all nonsens, I do not know.... A second
question here would be is there a code you can write to clear out single
table in a dataset?
Thanks in advance

David J

As for the second question, you can call the Clear method of the DataTable
you want to clear out. This could get errors (exceptions) if there are
DataRelations set up with that table, though.
 
Back
Top