# How do you clear deltas in C# .NET DataAbstract adapter

**URL:** https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183
**Category:** Data Abstract
**Tags:** net
**Created:** [October 20, 2026, 3:38pm UTC](https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183 "2026-10-20T15:38:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [October 20, 2026, 3:38pm UTC](https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183/1 "2026-10-20T15:38:55Z")

</div>

I have a dataadapter on which I prepare row operations

Type is LinqDataAdapter

At some point I ask if the user wants to proceed and then perform

dataAdapterTags\_.CancelChanges();

when the user answers ‘no’

When I redo the same operation the code complains when calling DeleteRow(record)

It appears the CancelChanges did not remote the delta list

It could be that it is a “Delete” (If I am not mistaken I fixed the issue for insert/edit with the cancelupdates)

 ![image](https://talk.remobjects.com/uploads/default/original/3X/3/5/350adc048b927e9e2a636f6ca4e5376ea2eaa8ba.png)

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [October 21, 2026, 7:00am UTC](https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183/3 "2026-10-21T07:00:16Z")

</div>

workaround. replace

```
condata.dataAdapterTags_.CancelChanges();

```

with

```
var table = condata.dataAdapterTags_.GetTable<YourTagClass>();
for (int i = table.Changes.Count - 1; i >= 0; i--)
    table.RemoveChange(table.Changes[i]);

```

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [October 21, 2026, 7:00am UTC](https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183/4 "2026-10-21T07:00:46Z")

</div>

Logged as [bugs://D19732](https://www.remobjects.com/portal/bugs/?id=D19732).

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [October 21, 2026, 7:25am UTC](https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183/5 "2026-10-21T07:25:16Z")

</div>

Thanks for the info,

This is a dangerous bug for us.

A CancelChanges followed by an ApplyChanges might alter the DB too much, correct?

What does CancelChanges do in the buggy version?

What should it do in the fixed version? Rollback all inserts+updates+deletes?

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [October 21, 2026, 8:07am UTC](https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183/6 "2026-10-21T08:07:14Z")

</div>

[bugs://D19732](https://www.remobjects.com/portal/bugs/?id=D19732) was closed as fixed.

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [October 21, 2026, 8:15am UTC](https://talk.remobjects.com/t/how-do-you-clear-deltas-in-c-net-dataabstract-adapter/34183/7 "2026-10-21T08:15:45Z")

</div>

> [@fvancrae](#):
>
> A CancelChanges followed by an ApplyChanges might alter the DB too much, correct?

No. After CancelChanges, ApplyChanges has nothing to send. DB is not touched.

CancelChanges discards all pending inserts, updates and deletes. The bug is only that the same objects can’t be queued again afterwards: either an exception, or the change is silently not sent. **The fix will be in the next release, planned for next week.**

CancelChanges doesn’t restore property values you already changed on your objects. Re-fetch the rows if you need the original values.
