PC Review


Reply
Thread Tools Rate Thread

best practice for transactions

 
 
=?Utf-8?B?SnVsaWE=?=
Guest
Posts: n/a
 
      28th Nov 2005
Hi,
I'am developing an asp.net app that is using an sql server.

How should I deal with transactions? Should I do the transactions in my
stored procedures or should I use Serviced Components or...

Thanks
 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      28th Nov 2005
Julia,

Why do you think that Microsoft made such a lot of posibilities?

To give you a lot of bad practise?

Cor


 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      28th Nov 2005
On Mon, 28 Nov 2005 01:38:03 -0800, "Julia" <(E-Mail Removed)> wrote:

¤ Hi,
¤ I'am developing an asp.net app that is using an sql server.
¤
¤ How should I deal with transactions? Should I do the transactions in my
¤ stored procedures or should I use Serviced Components or...

Depends. Any of the three are viable so it's really a matter of figuring out which one will work
best based upon the methods you are using to update your database.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      28th Nov 2005
That all depends on exactly what your requirements are.

If you are only going to be doing updates to one database, then you should
not use serviced components. That means having to use COM+, and that is
unnecessary overhead.

If your updates will ever involve more then stored procedure, sql
statements, etc, then the easiest thing is just to use ADO.NET transactions
in your code.

"Julia" <(E-Mail Removed)> wrote in message
news:C2180291-6D50-42F2-83A6-(E-Mail Removed)...
> Hi,
> I'am developing an asp.net app that is using an sql server.
>
> How should I deal with transactions? Should I do the transactions in my
> stored procedures or should I use Serviced Components or...
>
> Thanks



 
Reply With Quote
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      29th Nov 2005
Julia,

Tranasctions are like ice-cream

They come in many flavors, they are almost always fattening, and they are
kinda necessary ;-)

So the various flavors are

a) Implicit Tranasctions
b) Explicit Transactions in the API
c) Explicit Transactions in Stored procedures
d) System.Transactions - volatile
e) System.Transactions - pspe
f) System.Transactions - durable
g) Loosely coupled systems with home grown 2pc

... So which one do you pick? "The lowest one you can get away with".

There are certain very isolated incidents where explicit transactions may
actually outperform implicit transactions in a single user scenario, and
there are other nuances based on your exact design and requirements that
guide you to the final architectural choice. I would recommend reading up
Chapter 11 of my ADO.NET 2.0 book (see signature) where I talk about
transactions in depth.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
----------------------------------------------------------------------------




"Julia" <(E-Mail Removed)> wrote in message
news:C2180291-6D50-42F2-83A6-(E-Mail Removed)...
> Hi,
> I'am developing an asp.net app that is using an sql server.
>
> How should I deal with transactions? Should I do the transactions in my
> stored procedures or should I use Serviced Components or...
>
> Thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Supporting Transactions A La System.Transactions in a custom system aldousd666 Microsoft ADO .NET 2 9th May 2007 01:49 PM
"Supporting" transactions a la System.Transactions aldousd666 Microsoft Dot NET Framework 0 8th May 2007 02:36 PM
Mixing ADO.NET transactions and Stored Procedure Transactions James Walker Microsoft ADO .NET 1 27th May 2004 11:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:42 AM.