Enlisting VBScript in an MTS/COM+ transaction 
Author Message
 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.



Tue, 03 Jun 2003 16:01:47 GMT  
 Enlisting VBScript in an MTS/COM+ transaction
The only way I know to do this is to use vb to create .wsc file
then register that component, then import the wsc com component into
MTS/COM+ package
Quote:

>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.



Tue, 03 Jun 2003 23:12:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. newbie - COM with MTS Vs COM without MTS

2. When to use MTS transactions and ADO Transactions

3. Detecting Variant Type In jscript - from com+/mts calls

4. Why to use COM+ transaction and not just SQL Server transaction

5. Why to use COM+ transaction and not just SQL Server transaction

6. Transaction in Com+

7. Transactions and com+ objects

8. using com+ with adabas transactions.

9. Transaction Server or Com+ ?

10. com+ transactions

11. ? - VB6, MTS/COM+ COM Object Development

12. Benefits / Differences of COM+ to COM / MTS?

 

 
Powered by phpBB® Forum Software