RE: URGENT: DataSet.GetChanges() returns an old version of the row

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Frank,

Welcome to MSDN Managed Newsgroup. My name is Lingzhi Sun [MSFT]. It's my
pleasure to work with you on this ADO.NET problem.

DataSet.GetChanges(), with no parameters, returns a copy of the DataSet
that contains all changes(added, modified, and deleted) made to it since it
was loaded or since AcceptChanges was last called. If GetChanges() is
called when the new row is added but the user has not modified it, we get a
DataSet which contains all the original data and the new row with default
values. However, if GetChanges() is called after the user has modified the
new row, we get a DataSet that contains all the original data and the new
row with modified values.

Please note: Once the new row is added into the DataSet, its DataRowState
is set to Added. Before the changes are accepted or reset, even if the new
row is modified, its DataRowState is still Added instead of Modified.

Frank, could you please clarify when the GetChanges is called? Before the
new row is modified or after that? Also, did you pass any parameters to
the GetChanges method to filter the data or just call the GetChanges with
no parameters?

If you have any questions or concerns, please feel free to let me know.

Have a nice day!


Best Regards,
Lingzhi Sun
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 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. 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/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: URGENT: DataSet.GetChanges() returns an old version of the row
    ... If GetChanges() is called when the new row is added but the user has not modified it, we get a DataSet which contains all the original data and the new row with default values. ... We welcome your comments and suggestions about how we can improve the support we provide to you. ... MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 2 business day is acceptable. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Incredibly Slow Access Times in Access 2007
    ... image fields. ... Thank you for using Microsoft MSDN Managed Newsgroup. ... Microsoft Online Community Support ... a Microsoft Support Engineer within 2 business day is acceptable. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: sqlx2008 basic configuration task
    ... In response to the second question, this is just one pc, with one instanse of SQL Express 2008, installed locally, on one domain. ... Thank you for using Microsoft MSDN Managed Newsgroup. ... Microsoft Online Community Support ... a Microsoft Support Engineer within 2 business day is acceptable. ...
    (microsoft.public.sqlserver.setup)
  • Re: Invalid Reference Error
    ... The subforms and controls difinitely exist and are never removed. ... Welcome to Microsoft MSDN Managed Newsgroup. ... Microsoft Online Community Support ... a Microsoft Support Engineer within 2 business day is acceptable. ...
    (microsoft.public.access.forms)
  • Re: Access 2007 Ribbon & toolbars
    ... The ribbon is a nice feature, but it does take up too much space. ... Thank you for using Microsoft MSDN Managed Newsgroup. ... Microsoft Online Community Support ... or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.access.forms)