943,865 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 1770
  • C# RSS
May 23rd, 2008
0

How many datasets in MS VS Project?

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster
edek is offline Offline
113 posts
since Oct 2006
May 24th, 2008
1

Re: How many datasets in MS VS Project?

Click to Expand / Collapse  Quote originally posted by edek ...
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.

Quote ...
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.

Quote ...
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.
Team Colleague
Reputation Points: 186
Solved Threads: 147
Cookie... That's it
alc6379 is offline Offline
2,519 posts
since Dec 2003
May 24th, 2008
0

Re: How many datasets in MS VS Project?

WOW! Thanks for such a long and full answer !
Reputation Points: 10
Solved Threads: 0
Junior Poster
edek is offline Offline
113 posts
since Oct 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Backgroundimages/ Skins ?
Next Thread in C# Forum Timeline: Any Idea how i can do this?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC