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?
Row was not deleted from generated DataSet
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.
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.
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.