DataSet 有一列是主键,在数据库里这主键值是自动生成.
现在在DataSet里添加新的数据.那主键列应该怎么做? 要写数据在主键列吗?然后用SqlCommandBuilder 和 SqlDataAdapter的Update 写入数据库.执行时出现"Concurrency violation: the UpdateCommand affected 0 of the expected 1 records."这个错误.主键列应该怎么处理? 谢谢了
现在在DataSet里添加新的数据.那主键列应该怎么做? 要写数据在主键列吗?然后用SqlCommandBuilder 和 SqlDataAdapter的Update 写入数据库.执行时出现"Concurrency violation: the UpdateCommand affected 0 of the expected 1 records."这个错误.主键列应该怎么处理? 谢谢了
以前用SqlCommandBuilder 的一点经验:
http://blog.csdn.net/chengking/archive/2005/08/26/465874.aspx