I use this line:
DataSet.SomeTableName.Rows.InsertAt(someRow, 0);
After this line I update my SQL table. But the inserted row does not appear on the SQL server side.
Any idea why the inserted row doesn't appear on the SQL server side?
Issue the SetAdded
method:
someRow.AcceptChanges();
someRow.SetAdded();
as far as I know InsertAt
doesn't actually perform the RowState
modifications.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.