无法更新记录 [英] Unable to Update Record
本文介绍了无法更新记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个没有任何主键的sql表,因为录取号码没有。将重复..
在同一个表中,一个字段具有属性BIT(表示真或假)
我使用Create New Data Source创建一个包含此表的新数据集。 ..
我把那张桌子拖到一个新的表格中...就像一个gridview ...现在当刻在一下coloumn并尝试保存
时它会给我以下错误:
当传递带有修改行的DataRow集合时,更新需要有效的UpdateCommand。
请帮助... 。
I have one sql table without any primary key because admission no. will be repeated..
In same table one field with property BIT (means true or false)
I create a new dataset with this table using Create New Data Source....
I drag that table into a new form.. like a gridview... Now when Tick on bit coloumn and try to save
it gives me following error:
Update requires a valid UpdateCommand when passed DataRow collection with modified rows.
please help....
推荐答案
在这里你去
Update在传递带有修改行的DataRow集合时需要有效的UpdateCommand [ ^ ]
删除或更新需要有效传递带有修改行的DataRow集合时的DeleteCommand或UpdateCommand [ ^ ]
Here you go
Update requires a valid UpdateCommand when passed DataRow collection with modified rows[^]
Delete or Update requires a valid DeleteCommand or UpdateCommand when passed DataRow collection with modified rows[^]
你做过保持空白输入?如果你保留任何coloumn空,那么这些类型的消息显示。
使用try catch不显示这些错误消息
did you keep blank input? If you keep empty any of coloumn then these type messages shows.
Use try catch to don't shows these error messages
这篇关于无法更新记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文