
Enlisting VBScript in an MTS/COM+ transaction
We are loading the
VBScript ActiveScripting Engine in a server for
processing. I'm looking for a way to access the ObjectContext to
programmatically call SetAbort to fail the transaction.
I've spent some time looking through code. I've tried stuff like the
following:
-----------------
set app = CreateObject("MTxApp.Application.1")
set objContext = app.GetObjectContext
...
... ' stuff
....
if ..... then
objContext.SetAbort
else
objContext.Commit
end if
-----------------
But, of course, it doesn't work. The VBScript runs okay (without failure),
but it actually doesn't work.