Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADO.NET or Enterprise Services (ES)

1 view
Skip to first unread message

lottoman2000

unread,
Apr 7, 2005, 4:51:29 PM4/7/05
to
I am debating which route to take for Declarative Trans
Application. ADO.NET or ES (COM+). What do i gain by going
the ADO.NET rounte and cetainly at what cost?
Thank you

Sahil Malik [MVP]

unread,
Apr 7, 2005, 5:03:27 PM4/7/05
to
ADO.NET gets my vote.

Here are the reasons -

ES - means GAC - means strongly named - pain in the butt.
ADO.NET gives you the option of creating distri trans at database level.
Managing those transactions without involving MSDTC is a better idea, if
both RMs are going to be databases.

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/

"lottoman2000" <anon...@discussions.microsoft.com> wrote in message
news:12a301c53bb3$927d09e0$a601...@phx.gbl...

John Papa

unread,
Apr 7, 2005, 5:13:04 PM4/7/05
to
1) ADO.NET Transactions: Good for local transactions to a single database

2) EntServices (COM+) Transactions: Good for distributed transactions, but
costly for local transactions. Plus the GAC, plus strong names, plus COM+
overhead.

--John Papa
http://codebetter.com/blogs/john.papa

Miha Markic [MVP C#]

unread,
Apr 7, 2005, 5:26:33 PM4/7/05
to
What's wrong with strong names and GAC (apart from registration)?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

"John Papa" <John...@discussions.microsoft.com> wrote in message
news:9600F50B-920F-4317...@microsoft.com...

Sahil Malik [MVP]

unread,
Apr 7, 2005, 6:01:27 PM4/7/05
to
I wanna add.

Even if you wanna do distributed transactions with ADO.NET in 1.1, you can
still do them at the database level using linked servers, or BEGIN
DISTRIBUTED TRANSACTION.

It's just not as elegant as 2.0, but it's sure better than involving MSDTC.

"John Papa" <John...@discussions.microsoft.com> wrote in message
news:9600F50B-920F-4317...@microsoft.com...

Sahil Malik [MVP]

unread,
Apr 7, 2005, 6:00:35 PM4/7/05
to
Two things I can think right off the bat -

a) Deployment is a pain.
b) Deploying newer versions is stricter (without a public key, you can
simply swap the dll, as long as signatures don't change, but with a strong
key oooh good luck !!)
c) Newer versions are simply overwrite the file, with GAC u gotta do a
publisher policy, or two versions end up in the GAC.

Wait that's 3 downsides LOL :)

"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:ub$u6h7OF...@tk2msftngp13.phx.gbl...

Angel Saenz-Badillos[MS]

unread,
Apr 8, 2005, 3:37:58 PM4/8/05
to
My vote goes to using System.Transactions in the 2.0 framework as the best
choice.
http://blogs.msdn.com/angelsb/archive/category/6274.aspx

If you want to use v1.1 then I would vote for ServiceConfig.
http://blogs.msdn.com/florinlazar/archive/2004/07/24/194199.aspx

The only downside of ServiceConfig is that it requires Windows2003 or WinXp
service pack 2, other than that it is a very clean way of dealing with
distributed transactions, no strong name signing or using attributes. Here
is some code:

ServiceConfig config = new ServiceConfig();
config.Transaction = TransactionOption.Required;

ServiceDomain.Enter(config);

try

{

MyTxCode(); //SqlConnections will autoenlist on tx here

}

catch(Exception e)

{

// we got an exception

Console.WriteLine(e.Message);

// so, we should abort the transaction

ContextUtil.SetAbort();

}

finally

{

ServiceDomain.Leave();

}


--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/


"Sahil Malik [MVP]" <contactme...@nospam.com> wrote in message
news:O3$5607OF...@TK2MSFTNGP15.phx.gbl...

Sahil Malik [MVP]

unread,
Apr 8, 2005, 4:37:11 PM4/8/05
to
Angel,

Even when a distributed transaction can be contained using transactions at
the database level ... do you still recommend using Syst.Tran?
Why so? I thought MSDTC was evil. (We're talking 2 databases, not one).

"Angel Saenz-Badillos[MS]" <ang...@online.microsoft.com> wrote in message
news:eUiZ7JH...@tk2msftngp13.phx.gbl...

Angel Saenz-Badillos[MS]

unread,
Apr 8, 2005, 10:30:32 PM4/8/05
to
Must have slept through the thread, I thought that he was asking about
scenarios where a single transaction will not work so no way to use
transactions at database level. If the question is whether to use dtc or
local transactions then definitelly use local transactions and preferably in
the stored proc level.

If on the other hand you need to use two connections I would use
System.Transactions rather than sp_bindsession. Against two different
servers again dtc is hard to beat.

--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/


"Sahil Malik [MVP]" <contactme...@nospam.com> wrote in message

news:OFj8#qHPFH...@TK2MSFTNGP15.phx.gbl...

Sahil Malik [MVP]

unread,
Apr 9, 2005, 12:52:55 AM4/9/05
to
Right, exactly my thoughts (afterall I learnt all this from you .. LOL).

"Angel Saenz-Badillos[MS]" <ang...@online.microsoft.com> wrote in message

news:uPFjcwKP...@TK2MSFTNGP09.phx.gbl...

0 new messages