Click to See Complete Forum and Search --> : Method of object Failed


mpaul
October 10th, 2001, 07:06 AM
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

Cakkie
October 10th, 2001, 08:27 AM
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
slisse@planetinternet.be

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