You may be interested in an earlier discusion - The idea is you do away with typed datasets and go for untyped datasets. The main argument was the benefits of being strongly typed were not worth the extra support and maintenance required. Everytime you make a change you have to make massive changes this causes headaches especialy in the dataAdapter logic.
I can not really see the point of using a Collection crafted by a tool . If you want uber performance you would hand craft your collection and classes . This will take orders of magnitude more effort. Otherwise you would just use Datasets which are very flexible. The earlier thread also discussed wrapping the datarowto give the same effect. Typed Datasets have a few minor issues ( eg remoting issues) , but I still use them in my form based apps , for remoting and the middleTier I use untyped datasets. I figure if the dataset changes so will the form so the maintance cost here is not too bad. Regards , Ben Kloosterman -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]]On Behalf Of Oren Novotny Sent: Sunday, 6 October 2002 1:29 PM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Strongly-Typed DataSets vs. Strongly-Typed Collections Hello, I was curious as to why one would want to use a strongly-typed collection (generated from a tool of some such) versus using a strongly-typed dataset (generated from an xsd). Here's why I'm asking: I figured a collection would be easier since I had a bunch of objects and I wanted to be able to add/remove them, etc. But then I also wanted to databind them to a listbox control. Here's the catch: while the databinding works (since the collection implements IList), it's not really useful. If you add/remove/change elements in the databound collection, the listbox is not updated. It's not very well documented, but if you want auto-updating to work, then your collection must implemente IBindingList[1]. Among classes that do implement that interface are DataView's, DataTable's, and DataSet's. So that begs the question. Why not just always use a strongly-typed DataSet, since that way databinding will always work as expected. Is there some reason not to use one over the other? What about performance? At what point is one worth the trade-off of the other? It seems like you can create a simple XSD using the designer that has the same functionality as a custom collection. Just put a single Element there and in it, put your columns and types. If you want, set a primary key. That very nicely corresponds to a collection of a given type... Any thoughts? [1] ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemComponentModelIBinding ListClassTopic.htm --Oren You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.