Page 1 of 1

Row was not deleted from generated DataSet

Posted: Fri 06 Aug 2010 07:18
by imre.dudas
Hello,

I have written a little application, that require .NET 2.0. I don't want to use latest .NET, so I use DataSet technology.

I generated my DataSet with DataSet wizard, add, modify rows programmatically, but the Delete method (ds.Connections.RemoveConnectionsRow(Row)) is not work. My table name is Connections . :-)

I call Update method too.

I have checked events. ConnectionsRowDeleting was called, and the row is ok in event args. The ConnectionsRowDeleted method was not called.

What did I wrong?

Posted: Fri 06 Aug 2010 16:55
by Shalex
Thank you for your report. I have checked the 2.90.152 version of dotConnect for SQLite. The RowDeleting and RowDeleted events are fired, and the row is deleted from DataTable. But Update() doesn't remove it from database. We will investigate the issue and notify you about the results as soon as possible.

Posted: Wed 18 Aug 2010 12:45
by Shalex
We have investigated the issue. This is a designed behaviour.
ds.Connections.RemoveConnectionsRow(Row) removes DataRow from the table of your dataset and marks it as Detached (but not Deleted). So, the Delete command is not executed in this case.

Please use ds.ConnectionsRows[0].Delete(); instead of ds.Connections.RemoveConnectionsRow(Row) to remove DataRow from your database.