ADO Connection Transaction vs. ObjectContext Transaction 
Author Message
 ADO Connection Transaction vs. ObjectContext Transaction

Hi everone,

I'am new to VB and Com++. I'm cofusing.

1. Do I need to use both ADOConnection Transaction and ObjectContext Transaction.

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Sat, 17 Jan 2004 01:57:17 GMT  
 ADO Connection Transaction vs. ObjectContext Transaction

Quote:
> I am new to VB and COM+. I'm confused.
> 1. Do I need to use both ADOConnection Transaction and ObjectContext Transaction.

Steve,
If you are going to place your VB components in COM+, then use the
ObjectContext transaction.  For an example, see
http://msdn.microsoft.com/library/en-us/cossdk/htm/pgprimer_4p4i.asp

You can also manually control the COM+ transaction using the
TransactionContext object.  For more info, see:
http://msdn.microsoft.com/library/en-us/cossdk/htm/transactioncontext...

If you are NOT going to place your VB components in COM+, then use
the ADO Connection transactions.  For more info, see
http://msdn.microsoft.com/library/en-us/ado270/htm/mdcontrxproc.asp

--

Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com

Quote:

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sat, 17 Jan 2004 02:18:29 GMT  
 ADO Connection Transaction vs. ObjectContext Transaction
thank you for your info. I will review these links. One more question .

Right now my VB component only uses Cnn.transaction and declare as "NotAnMTSObject". I am running this component in Com+ enviroment.
If I switch to use ObjectContext trans and declare as "Required Trans", will the peformance be suffer because the overhead of ObjectContext Transaction?

thank you for your advice

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 17 Jan 2004 03:26:55 GMT  
 ADO Connection Transaction vs. ObjectContext Transaction
thank you for your info. I will review these links. One more question .

Right now my VB component only uses Cnn.transaction and declare as "NotAnMTSObject". I am running this component in Com+ enviroment.
If I switch to use ObjectContext trans and declare as "Required Trans", will the peformance be suffer because the overhead of ObjectContext Transaction?

thank you for your advice

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 17 Jan 2004 03:26:50 GMT  
 ADO Connection Transaction vs. ObjectContext Transaction

Quote:
> Right now my VB component only uses Cnn.transaction and declare as
> "NotAnMTSObject". I am running this component in Com+ environment.

Of course that is another option you can use...  ;-)

Quote:
> If I switch to use ObjectContext trans and declare as "Required Trans",
> will the performance suffer because the overhead of ObjectContext Transaction?

Good question!   I don't have actual performance numbers between the two.  May be
someone else in this newsgroup can provide these...  

IMHO - For applications that need to scale, you should use the COM+ ObjectContext
Transactions.  For small applications, the Connection Transactions can actually be faster
than the COM+ Transaction.

You might want to ask this question over in the COM+ newsgroup.
microsoft.public.platformsdk.complus_mts

--

Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com



Sat, 17 Jan 2004 03:47:49 GMT  
 ADO Connection Transaction vs. ObjectContext Transaction
Carl,
    I may just be confused but another take on this is a set of rules like
this for DB components:
        1) Always register with COM+
        2) use ADOConnection Transaction to control transactions in a single
             DB instance
        3) use  ObjectContext Transaction to control two phase commit across
multiple DB instances

what say U?

Quote:

> > I am new to VB and COM+. I'm confused.
> > 1. Do I need to use both ADOConnection Transaction and ObjectContext
Transaction.

> Steve,
> If you are going to place your VB components in COM+, then use the
> ObjectContext transaction.  For an example, see
> http://msdn.microsoft.com/library/en-us/cossdk/htm/pgprimer_4p4i.asp

> You can also manually control the COM+ transaction using the
> TransactionContext object.  For more info, see:

http://msdn.microsoft.com/library/en-us/cossdk/htm/transactioncontext...
sp
Quote:

> If you are NOT going to place your VB components in COM+, then use
> the ADO Connection transactions.  For more info, see
> http://msdn.microsoft.com/library/en-us/ado270/htm/mdcontrxproc.asp

> --

> Thanks,
> Carl Prothman
> Microsoft Visual Basic MVP
> http://www.able-consulting.com

> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!



Sat, 17 Jan 2004 19:46:57 GMT  
 ADO Connection Transaction vs. ObjectContext Transaction

Quote:
> Carl,
>     I may just be confused but another take on this is a set of rules like
> this for DB components:
>         1) Always register with COM+
>         2) use ADOConnection Transaction to control transactions in a single
>              DB instance
>         3) use  ObjectContext Transaction to control two phase commit across
> multiple DB instances

Interesting...     Somehow #2 doesn't sound correct....

I sure would be interested in hearing what others in this newsgroup say about this issue.    

--

Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com



Sat, 17 Jan 2004 23:06:48 GMT  
 ADO Connection Transaction vs. ObjectContext Transaction
I know that #2 is contra receive wisdom but I have seen reference in a
couple of places asking why should we incure the overhead of COM+
transaction which is just going to turn around and use SQL Server (or
whatever) native transaction support.  In that case why not just code the
transaction into either the ado connection or just use SQL statements to set
up the transaction?

Quote:

> > Carl,
> >     I may just be confused but another take on this is a set of rules
like
> > this for DB components:
> >         1) Always register with COM+
> >         2) use ADOConnection Transaction to control transactions in a
single
> >              DB instance
> >         3) use  ObjectContext Transaction to control two phase commit
across
> > multiple DB instances

> Interesting...     Somehow #2 doesn't sound correct....

> I sure would be interested in hearing what others in this newsgroup say
about this issue.

> --

> Thanks,
> Carl Prothman
> Microsoft Visual Basic MVP
> http://www.able-consulting.com



Sun, 18 Jan 2004 20:51:46 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. ADOConnection.Transaction vs. ObjectContext.Transaction

2. ADODB TRANSACTION ADO ERROR No Transaction is Active

3. ADODB TRANSACTION ADO ERROR No Transaction is Active

4. When to use MTS transactions and ADO Transactions

5. ADO Connection (resource) pooling with COM+ transactions

6. Any ADO Connection Property to check if A transaction is Open

7. how to check ado connection transaction status???

8. ADO Connection (resource) pooling with COM+ transactions

9. Transaction server and ADO connection.

10. Determine if a ADO-Connection is in a Transaction

11. To Transaction or Not to Transaction that is the question

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

 

 
Powered by phpBB® Forum Software