Results 1 to 15 of 15

Thread: Unexpected error number 457 has occurred...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Location
    San Pedro, CA
    Posts
    104

    Unexpected error number 457 has occurred...

    ... This key is already associated with an element of this collection.

    I am trying to create a package... and this cryptic message shows up. Any thoughts???

    I am running VB6/SP6.

  2. #2

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Location
    San Pedro, CA
    Posts
    104

    Re: Unexpected error number 457 has occurred...

    that's the problem... no code to reference. This is happening in the Package & Deployment Wizard. It just pops this up and that is that.

    Pretty useless, don't you think?

  4. #4
    Frenzied Member Campion's Avatar
    Join Date
    Jul 2007
    Location
    UT
    Posts
    1,098

    Re: Unexpected error number 457 has occurred...

    Somewhere, you've already added something into that collection the key you are trying to use, i.e.: if you've already used the key "thisismykey" when you added an object to that collection, and you try to add something else with the key of "thisismykey" then it will throw an error becuase that key is already in use.

    *upon seeing the near-instantanious replies ahead of mine, and seeing that it doesn't involve the actual code, ignore this post.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Location
    San Pedro, CA
    Posts
    104

    Re: Unexpected error number 457 has occurred...

    yea, but I haven't added anything to any collection!

    I have checked my references and components in the application, and see nothing wacky. I will check again.

  6. #6
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Unexpected error number 457 has occurred...

    Quote Originally Posted by realbogus
    that's the problem... no code to reference. This is happening in the Package & Deployment Wizard. It just pops this up and that is that.

    Pretty useless, don't you think?
    Do you remember which screen was showing when it happend?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Location
    San Pedro, CA
    Posts
    104

    Re: Unexpected error number 457 has occurred...

    I found it!

    I had a control referenced twice... once as an OCX and again as an OCA.

    I removed the OCX reference, recompiled and it seems to be a-ok!

    I will test more.

  8. #8
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Unexpected error number 457 has occurred...

    Quote Originally Posted by realbogus
    ... This key is already associated with an element of this collection.

    I am trying to create a package... and this cryptic message shows up. Any thoughts???

    I am running VB6/SP6.
    That's very strange. I've created dozens of installation packages using the P&D Wizard without ever getting that error. I think you have two choices to resolve the problem: 1) Use Inno/Inno Script or some other 3rd party installer, or 2) edit the P&D Wizard (Setup1.VBP) and see if there is a collection inside and then use appropropriate debugging techniques.

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Location
    San Pedro, CA
    Posts
    104

    Re: Unexpected error number 457 has occurred...

    it is a strange error, indeed.

    I am in the process of creating the package... how does one select a silent install??? hm... time to do more research.

  10. #10

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Location
    San Pedro, CA
    Posts
    104

    Re: Unexpected error number 457 has occurred...

    for network deployment...

  12. #12
    Member
    Join Date
    Feb 2010
    Posts
    46

    Re: Unexpected error number 457 has occurred...

    Hi,

    This error is usually seen if you kept Error Trapping to "Break on All Errors" instead of "Break on Unhandled Errors".

    IN VBE, goto Tools, Options, General Tab, Error Trapping > "Break on Unhandled Errors".

  13. #13
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Unexpected error number 457 has occurred...

    Quote Originally Posted by sifar786 View Post
    Hi,

    This error is usually seen if you kept Error Trapping to "Break on All Errors" instead of "Break on Unhandled Errors".

    IN VBE, goto Tools, Options, General Tab, Error Trapping > "Break on Unhandled Errors".
    Please do us a favor and check the date of a thread before you answer. This one was 3 years old.

  14. #14
    Member
    Join Date
    Feb 2010
    Posts
    46

    Re: Unexpected error number 457 has occurred...

    Hi Martin,

    I left it because, no matter how old the thread may be, people like me do come across such issues and would like to share the possible solution, if found, with other people.

    If its too old for you, you need to make sure to close the thread to avoid further replies. Why have you kept it open?

  15. #15
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Unexpected error number 457 has occurred...

    Quote Originally Posted by sifar786 View Post
    Hi Martin,

    I left it because, no matter how old the thread may be, people like me do come across such issues and would like to share the possible solution, if found, with other people.

    If its too old for you, you need to make sure to close the thread to avoid further replies. Why have you kept it open?
    We have tens of thousands of threads and threads are only closed in rare cases when there's a problem of some sort with the thread. If you want to discuss this further please PM me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width