Hi Cetin,
Mind if I clarify something you said?
>>If forms are using a single shared dataset with all the datatables in it one would fill the data of one customer and the other with another customer. What a mess. IOW think each of your forms as a another user, would you have a single dataset with all the datatables in it and you'd give the reference to each of them?<There's a difference here between a DataSet definition (the .xsd) and the instance of the DataSet. I think perhaps that Martin was simply referring to a DataSet definition (so, in your above example, you would in fact be using the same DataSet, but not the same *instance* of the DataSet).
But, basically a DataSet should be a grouping of things that logically would go together for particular functionality in your app. So, Martin, don't throw everything but the kitchen sink into one DataSet!! <g>
~~Bonnie
>>Good afternoon!
>>
>>I was just curious if there is such a thing as TOO MUCH DATA SETS or TOO LITTLE DATA SETS? I am just starting to make use of DataSets and I was planning on dumping all my data tables into just one data set (even unrelated tables). Is this wise? Or should I create a data set for each group of related tables?
>>
>>I was thinking, if I dump all my data tables into one data set, would it be a waste, if a form will, say, only make use of one of the tables?
>>
>>Thus, I thought about breaking the data set into several smaller data sets, but then I would have a lot! Right?
>>
>>I need someone to turn on the bulb in my head regarding this... PLEASE!!!
>>
>>
>>A million thanx! in advance 8 )
>>
>>Martin
>
>Martin,
>Having multiple would help in naming in cases. Other than that a DataSet is a 'container'. When you pass a dataset you're not passing it with all the tables, relations... in it, you're passing just a reference. IOW in memory it still occupies the same place.
>To be able to read/write data you neither need a dataset nor a datatable. They make things easier. So IMHO there is not 'too little' or 'too much'.
>
>However that doesn't mean you should use the memory freely and get more datatables than you need. Having a single shared dataset for all forms of an app means all forms should know what they're doing. Consider this simple scenario:
>-You've a form that gets a customer ID and deals with that customer's data.
>-You might want to launch another instance of that form with another customer ID while first one is still open (and believe me sooner or later similar things occur to database developers)
>
>If forms are using a single shared dataset with all the datatables in it one would fill the data of one customer and the other with another customer. What a mess. IOW think each of your forms as a another user, would you have a single dataset with all the datatables in it and you'd give the reference to each of them?
>
>My suggestion, each form has its own private dataset with tables it needs (and again you don't need dataset or datatable for read/writing data - for example a form might just show a list and might request a datareader to fill the list from data handler).
>Cetin