What is the best dataset approach in a database application

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
 
P

Patrick Steele [MVP]

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
 
J

Jeremy Williams

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top