我在SQLServer2008 R2中有一个表,其中有一个表CT11。我想要的是停止使用cellendedit事件在表中插入重复记录。我怎么能做到这一点,因为我得到了重复的记录?Private Sub DataGridView1_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellE
我可以从DataGridView在Person DataTable中插入记录。PersonID列显示PersonID的唯一负值。我通过调用DataAdapter.Update(PersonTable)更新数据库,SQLServer自动将负的PersonID转换为正的唯一值。
这就是问题所在。Address DataGridView显示了地址表,其中包含一个DataRelation to Person by PersonID。