Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是为什么?添加数据行的状态。当我删除该行时,状态不变。为什么不删?这就是我的删除存储过程永远不会被调用的原因!
编辑:数据行是新添加的,然后我尝试将其删除。
请显示您的代码。我的测试表明一切正常:
DataTable dt = new DataTable(); DataRow dr = dt.NewRow(); dt.Rows.Add(dr); Console.WriteLine(dr.RowState); dr.Delete(); Console.WriteLine(dr.RowState);
输出是:
Added Detached