For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > April 2006 > Re: Processing elements in collection generates "The object invoked has disconne









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Processing elements in collection generates "The object invoked has disconne
Larry Serflaten

2006-04-26, 7:56 am


"Bookreader" <Bookreader127@yahoo.com> wrote

> I still haven't had anyone tell me what the message means. What does
> "object has been disconnected from its clients mean?" I might be able
> to figure out what is causing it if I know what it means.
>
> I googled and still can't find any description of what it is supposed
> to mean. What are an objects clients? What does "disconnected" mean?
>
> I'm looking for understanding in addition to fixing the instant case.


I am not certian this is an accurate explaination, but it may serve the
purpose to help you troubleshoot the problem.

Suppose you create an ActiveX exe file, and that program offers you
a list of links in a collection. So you start a new application and call
on that AX object and set a reference to the supplied collection.

Then some time later you plan to loop through the collection to list all
the links, but, unfortunately, in the meantime, the AX has terminated
so its collection becomes unavailable.

In a case like that the 'invoked object' would be the AX object, and
your new app would be the 'client'. Because the AX object terminated,
any client that had set references to it now has a set of worthless references.

You can imagine errors will result when a program tries to use broken
references. That is approximately what 'disconnected' means, the
connection that was present earlier, is now broken.

While I think a terminated object would actually give you a different
error number, something to that effect may be happening in your program.
You may also have stumbled across a known bug or other such error
depending on what you are doing. Just seeing the loop (without the
definitions and assignments) doesn't help much in this case....

For an example of how you might get that error, check out this link:
http://support.microsoft.com/default.aspx/kb/270589

HTH
LFS


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com