Board index » delphi » Transaction Contexts

Transaction Contexts

I'm hoping someone can help me out with Transaction Contexts.  I'm getting a
run-time error on the call to CreateInstance below.  The Ole error that is
generated is 8004E004.  I've been unable to track down the definition of
that error, let alone the cause for this error.  I had to import
\WINNT\System32\MTS\txctx.dll into Delphi in order to have access to the
ITransactionContext interface.

    TransactionContext : ITransactionContext;
    SessionVariant : OleVariant;

    TransactionContext := CreateRemoteComObject('devappsrv1',
Class_TransactionContext) as ITransactionContext;
    SessionVariant := (TransactionContext as
ITransactionContext).CreateInstance('Session.Session.1');

Any help would be appreciated.

TIA,
Susan

 

Re:Transaction Contexts


Hello,

Transaction context objects must run in-process with the client application
thats calling them. Therefore:

1) You cannot use CreateRemoteComObject
2) You need to have MTS installed on the machine where you want code to
create the transaction contexts

have fun,

--
Binh Ly
Brickhouse Data Systems, Inc.
http://www.brickhouse.com

Quote
Susan Wright wrote in message <6oif78$6...@forums.borland.com>...
>I'm hoping someone can help me out with Transaction Contexts.  I'm getting
a
>run-time error on the call to CreateInstance below.  The Ole error that is
>generated is 8004E004.  I've been unable to track down the definition of
>that error, let alone the cause for this error.  I had to import
>\WINNT\System32\MTS\txctx.dll into Delphi in order to have access to the
>ITransactionContext interface.

>    TransactionContext : ITransactionContext;
>    SessionVariant : OleVariant;

>    TransactionContext := CreateRemoteComObject('devappsrv1',
>Class_TransactionContext) as ITransactionContext;
>    SessionVariant := (TransactionContext as
>ITransactionContext).CreateInstance('Session.Session.1');

>Any help would be appreciated.

>TIA,
>Susan

Other Threads