Home All Groups Group Topic Archive Search About

CollectionBase custom collection / GetChanges ?

Author
31 Aug 2006 10:25 AM
Olivier Matrot
Hello,
Somebody ever tried to create a "GetChanges" method in a custom collection
implementation (CollectionBase)?
The goal is to provide the same behavior of the DataSet.GetChanges method to
update the underlying datasource.
TIA.

Author
1 Sep 2006 12:52 AM
Kevin Yu [MSFT]
Hi Olivier,

In my opinion, we cannot implement a GetChanges method in CollectionBase,
as it does in DataSet. Because in DataSet, each DataRow in it has a
property named RowState. The GetChanges method looks for changes according
to the RowState value. All the rows with the value of Added, Modified and
Deleted are changed rows, thus the method can build a collection of changed
rows.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Author
1 Sep 2006 7:41 AM
Ryan Ren
Hi Olivier,

AFAIK, there is a good article from Codeproject demonstrates how to
implement a customize collection as the business object. The GetChanges
method was implemented in the class. Please refer it via accessing the link
below:
http://www.codeproject.com/csharp/customcollection.asp

Regards,

Ryan

Show quote
"Olivier Matrot" wrote:

> Hello,
> Somebody ever tried to create a "GetChanges" method in a custom collection
> implementation (CollectionBase)?
> The goal is to provide the same behavior of the DataSet.GetChanges method to
> update the underlying datasource.
> TIA.
>
>
>

AddThis Social Bookmark Button