Hi,
I'm new to transactions, so if the question is very simple for you, still please reply.
I'm triing to build a transaction that use 3 components
This transaction should read a message from a queue (MSMQ) do some processing with that message and write back to the queue another message.
The first component is RootTransaction (set to Require a new transaction) This one just instantiate the other 2 and call them. It instantiate them using objCtx.CreateInstance to preserve the context of the transaction.
The second component(OperateQueue)(set to require transaction)read and write to the queue-This work fine.
The third component (ExecuteTasks)(set to require transaction) should do some database processing with the message received from the queue.Here I have problems:
Any time I'm trying to write to database I receive an error like "Distributed transaction completed, Either enlist this transaction into anew one or into the NULL transaction"
I must mention that i create the connection obj with objCtx.CreateInstance("ADODB.Connection"
-is this correct?
-Do you have any working example that do any update to a table into a component used into a transaction?
Practiclly, I don't want to finish the transaction into OperateQueue or ExecuteTask objects.
also at the end of the OperateQueue component I call objCtx.EnableCommit or objCtx.DisableCommit
I use NT4 workstation, sql 7
Thank you,
Sorin
I'm new to transactions, so if the question is very simple for you, still please reply.
I'm triing to build a transaction that use 3 components
This transaction should read a message from a queue (MSMQ) do some processing with that message and write back to the queue another message.
The first component is RootTransaction (set to Require a new transaction) This one just instantiate the other 2 and call them. It instantiate them using objCtx.CreateInstance to preserve the context of the transaction.
The second component(OperateQueue)(set to require transaction)read and write to the queue-This work fine.
The third component (ExecuteTasks)(set to require transaction) should do some database processing with the message received from the queue.Here I have problems:
Any time I'm trying to write to database I receive an error like "Distributed transaction completed, Either enlist this transaction into anew one or into the NULL transaction"
I must mention that i create the connection obj with objCtx.CreateInstance("ADODB.Connection"
-is this correct?
-Do you have any working example that do any update to a table into a component used into a transaction?
Practiclly, I don't want to finish the transaction into OperateQueue or ExecuteTask objects.
also at the end of the OperateQueue component I call objCtx.EnableCommit or objCtx.DisableCommit
I use NT4 workstation, sql 7
Thank you,
Sorin