简体   繁体   中英

InsertAt() method doesn't update SQL table

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM