>>>Are you using the Context object ?
>>
>>I use it for the main function. I find that to be a pain to have to code all this in each function.
>>
>
>OK, that's one problem.
>Yes it's a pain but it's the way to tell MTS to use the function in the context of the transaction and to pool the ressources.
>In a word: you MUST code the Context object in all functions/Subs that you call.
Ok, I'll do that. Of course, it could be easier if VB would be OOP so I wouldn't have to code this in each function as well as the error handler. This is about 20 lines for each function.
>>>Are each part of the transaction stateless (each part not aware of the others) ?
>>
>>There is a chaining call between them.
>
>That could also be a problem.
>You must do something like this:
>
>Transaction: transfert 100$ from checking account to saving account.
>Object: Banking. Use the Context object.
>
>Methods: WithDraw() and Add()
>Use the Context object in each one telling it to be in the context of the Banking transaction.
>Open your connection. Do your stuff. Close your connection.
>Tell the Context object if you were successfull or not.
>
>Do NOT share a connection (or database) between the Banking object and both Methods. Each must be stateless (not aware of each other).
Thanks for the info.