分享一个自己对"Error457"的看法,欢迎讨论

zhmsong 2005-05-07 11:17:36
今天在打包时遇到了“未知错误号 457已经发生:该键已同该集合的一个元素关联”

在CSDN上的说法一般都是“重新引用,或者重新安装VB”,当然我也用了这样的方法,
但不灵验:(

在MSDN上,微软的错误提示是这样的,

This key is already associated with an element of this collection (Error 457)

A key is a string specified in the Add method that uniquely identifies a specific
member of a collection. This error has the following cause and solution:

You specified a key for a collection member that already identifies another member of
the collection. Choose a different key for this member.

但是我也没有用到Add方法去引用同样一个集合:(

后来在http://support.microsoft.com/default.aspx?scid=kb;en-us;183826 看到了对这个错误的另外描述,是说软件误认为一个IP地址对应了两个sites,或者两个对象××调用了一个数据库什么的,在我自己的程序中,是
两个选项卡中的Adodc引用了同一个数据表,因此,我试着去掉了一个Adodc,最后干脆将第二个Adodo转移到了第一个选项卡上,和第一个Adodc合二为一了,结果打包成功了:)

讨论一下。。



...全文
302 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

7,763

社区成员

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

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