C#中的DataRow State属性更改 [英] DataRow State Property Change in C#

查看:431
本文介绍了C#中的DataRow State属性更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个数据集,我使用importrow从1个数据集复制到另一个数据集并保存到数据库。

现在复制行的数据集添加了rowstate,可以将其更改为未更改,因为我需要稍后检查是否根据rowstate保存更改

I have 2 datasets , i copied from 1 dataset to other using importrow and save to database.
Now the dataset from which rows are copied has rowstate as added , can i change it to unchanged , as i need to check later whether changes are saved or not based on rowstate

推荐答案

嘿,在数据集上调用AcceptChanges方法会将rowstate设置为不变。

请参阅 http://msdn.microsoft.com/en-us/library/system.data.dataset.acceptchanges.aspx [ ^ ]
Hey calling the AcceptChanges method on the data set will set the rowstate to unchanged.
Please see http://msdn.microsoft.com/en-us/library/system.data.dataset.acceptchanges.aspx[^]


这篇关于C#中的DataRow State属性更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆