我再次在datatable中添加了数据我在此表中添加了相同的数据,然后错误味精显示此数据已使用vb.net退出 [英] i have add the data in datatable again i add the same data in this table then error msg display this data is already exitice using vb.net

查看:67
本文介绍了我再次在datatable中添加了数据我在此表中添加了相同的数据,然后错误味精显示此数据已使用vb.net退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我再次在datatable中添加了数据,在此表中添加了相同的数据,然后错误msg使用vb.net显示此数据已经存在,请使用vb.net

i have add the data in datatable again i add the same data in this table then error msg display this data is already exitice using vb.net

推荐答案

问题可能是由于Primary Key列引起的.将主键列的值添加到DataTable之后,如果再次将相同的值添加到DataTable,则可能会引发上述错误,因为PrimaryKey 列中不允许使用重复的值.
The issue may be because of Primary Key column. After adding a value of primary key column to the DataTable, if the same value is again added to the DataTable, the above error may be thrown as duplicate values are not permitted in PrimaryKey column.


这篇关于我再次在datatable中添加了数据我在此表中添加了相同的数据,然后错误味精显示此数据已使用vb.net退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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