CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2001
    Location
    Bangalore.INDIA
    Posts
    25

    Method of object Failed

    I get a "Method of Object Failed Error"
    only once ina while.Not on all the com/dcom call s but some calls fails
    while VC client tries to access a vb component on MTS.
    Same dll when called from a dummy vb client has no problems anyno of times u call it.i have doubt regarding instance release
    Can u give me a solution or all possible causes f this error
    vc is holding the pointer to component for later calls .
    not releasing it and subsequent calls access methods using this global pointer.
    But vb code is createobject and set nothing






  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Method of object Failed

    This is typical about MTS/COM+, my guess is that you executing some commands on a database, like INSERT or stuff. For some reason (probably because the values used aren't accepted by the database) it generates an error. The error is thrown up to the the calling process (if no errorhandling is implemented that is), which throws it up on his turn and so on until someone catches the error. At least, that is the normal way of business. With COM+/MTS, the error will be thrown up until it reaches the stub, this is an object on the remote computer that acts like the object itself (sounds hard, but that's MTS/COM+). This stub must then throw the error to the proxy (that is the refference to the object on the client side, your VB program). For some (unknown?) reason, the stub may occasionally fail to cast the complete error up to the proxy, resulting in an incomplete error.

    From my experience as a COM+/MTS programmer, I can say that 9 times out of 10, this has got to do something with the database.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured