为何在使用ADO Recordset调用UpdateBatch的时候会出错?

Michael1 2000-06-22 04:39:00
请问:
为什么我在使用ADO Recordset调用UpdateBatch的时候会出现以下错误.
Insufficient or incorrect key column information; too many rows
affected by update.
如果再运行,他又会提示出以下错误:
The specified row could not be located for updating:Somevalues may
have been changed since it was last read.

请问各位高人,如何解决.万分感谢.
...全文
104 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Limu 2000-06-23
  • 打赏
  • 举报
回复
you have at least tow exact same record in then recordset that you want to batch update,but you didn't created a index to manage your record,so the error accured.
xguoz 2000-06-22
  • 打赏
  • 举报
回复
使用updatebatch时,所选取的Recordset必须把KEY字段作为所选取的最前面几个字段,否则updatebatch时会出错
liyang 2000-06-22
  • 打赏
  • 举报
回复
你使用batchupdate,你的表中有没有 identity字段(或primary key),因为batch update 要使用主键定位纪录。

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧