Hi,
1) Is it better to create one dataset for the whole project than many smaller (like one for each form)?
2) If I have 2 datasets, both has tableadapters that connects to the same data. Both table adapters load data to tables. Now, data in one of those tables changes and appropriate tableadapter updates the DB with it. Is data in second dataset also updated??
3) I load, lets say, 1 column from DB to column of table that has tree columns (two stay empty). Now I use only data from that 1 column, but in some moment I need to load also the other 2 columns. If I use .Fill() method of appropriate table adapter will it reload the first column of the table even if it contains identical data as DB??

Please help me with these questions. They are somewhat important if I'm to write fast DB app.

Hi,
1) Is it better to create one dataset for the whole project than many smaller (like one for each form)?

Depends. If you're using the datasets in the designer view, you really don't have THAT fine-grained of a control over when the datasets are instantiated, and how long they stick around in memory.

2) If I have 2 datasets, both has tableadapters that connects to the same data. Both table adapters load data to tables. Now, data in one of those tables changes and appropriate tableadapter updates the DB with it. Is data in second dataset also updated??

No. Even if the "source" of the data is the same, the Dataset is a completely different object that has its own contents. You have to update both datasets to have accurate contents.

3) I load, lets say, 1 column from DB to column of table that has tree columns (two stay empty). Now I use only data from that 1 column, but in some moment I need to load also the other 2 columns. If I use .Fill() method of appropriate table adapter will it reload the first column of the table even if it contains identical data as DB??

Please help me with these questions. They are somewhat important if I'm to write fast DB app.

You'd have to change the SelectCommand of the TableAdapter to get this new data. As such, it's a different Data set entirely. You could order them differently, or something.

Even if the data is exactly the same row-for-row, it doesn't make a difference. It reloads it all.

WOW! Thanks for such a long and full answer :)!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.