Deleted records in a dataset
-
Hi I am trying to explain my problem clear enough. I have a dataset DataSet1 which has some data retrieved from the database. I have a copy of DataSet1 called DataSet2. In DataSet2 user are doing some transaction..modifying and deleting rows in a datatable. Now I want to reflect deleted records of DataSet2 in DataSet1. I tried with "Merge", but it reflects only the modified not deleted records. Can anyone help solve this? Thanks in advance Muthu.
-
Hi I am trying to explain my problem clear enough. I have a dataset DataSet1 which has some data retrieved from the database. I have a copy of DataSet1 called DataSet2. In DataSet2 user are doing some transaction..modifying and deleting rows in a datatable. Now I want to reflect deleted records of DataSet2 in DataSet1. I tried with "Merge", but it reflects only the modified not deleted records. Can anyone help solve this? Thanks in advance Muthu.
You don't need a second copy of the dataset to track the changes yourself. Each row has a RowState property which tracks this so you can validate / undo / whatever
-
You don't need a second copy of the dataset to track the changes yourself. Each row has a RowState property which tracks this so you can validate / undo / whatever
-
Hi I am trying to explain my problem clear enough. I have a dataset DataSet1 which has some data retrieved from the database. I have a copy of DataSet1 called DataSet2. In DataSet2 user are doing some transaction..modifying and deleting rows in a datatable. Now I want to reflect deleted records of DataSet2 in DataSet1. I tried with "Merge", but it reflects only the modified not deleted records. Can anyone help solve this? Thanks in advance Muthu.
Are changes being made to dataSet1 while changes are being made to dataSet2 in the other application?
-
Are changes being made to dataSet1 while changes are being made to dataSet2 in the other application?
-
Hi I am trying to explain my problem clear enough. I have a dataset DataSet1 which has some data retrieved from the database. I have a copy of DataSet1 called DataSet2. In DataSet2 user are doing some transaction..modifying and deleting rows in a datatable. Now I want to reflect deleted records of DataSet2 in DataSet1. I tried with "Merge", but it reflects only the modified not deleted records. Can anyone help solve this? Thanks in advance Muthu.
I am not sure if this is what you want: for (int i = 0; i <= pTable.Rows.Count - 1; i++) { DataRowState rowState = pTable.Rows[i].RowState; if (rowState == DataRowState.Deleted) { //..... } }