我们可以使用DataSet更新没有PK的表Row吗? [英] Can we update a table Row which is not having PK using DataSet?

查看:124
本文介绍了我们可以使用DataSet更新没有PK的表Row吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个没有主键的表,需要在其中使用数据集更新行.当我尝试更新行时,出现此错误.
对于不返回任何键列信息的SelectCommand,不支持为UpdateCommand生成动态SQL."

有人可以帮我吗?

Hi All,

I have a table without primary key where I need to update a row using Dataset.When I was trying to update the row I am getting this error.
"Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information."

Can any one help me regarding this ?

推荐答案

如果您不返回主键信息,则不能,您不能使用数据集来更新信息.在这种情况下,您需要手动创建自己的删除和更新命令,并以这种方式执行操作.
If you aren''t returning primary key information, then no, you cannot use the dataset to update the information. In this situation you need to create your own delete and update commands manually and perform the operations that way.


这篇关于我们可以使用DataSet更新没有PK的表Row吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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