Rollback does not rollback datatable

Y

Young

I added a new record in a datatable within a transaction.

When I rollback the transaction, the new row is still in the datatable. Can
can I get the datatable to rollback as well?

I know that the actual data is not in the datatable. When I reload the
datatable, the row is not there.

The problem I have is the datatable is bound to a grid and the new row (even
though is it rolled back) is shown on the grid.

Can someone please help?

TIA
YL
 
J

Jeroen Mostert

Young said:
I added a new record in a datatable within a transaction.

When I rollback the transaction, the new row is still in the datatable. Can
can I get the datatable to rollback as well?
Try calling DataTable.RejectChanges() with the rollback.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top