954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How many datasets in MS VS Project?

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.

edek
Junior Poster
113 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 
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.

alc6379
Cookie... That's it
Team Colleague
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
 

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

edek
Junior Poster
113 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You