分享一个自己对"Error457"的看法,欢迎讨论
今天在打包时遇到了“未知错误号 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合二为一了,结果打包成功了:)
讨论一下。。