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

Re: best practice for transactions by Cor

Cor
Mon Nov 28 03:55:06 CST 2005

Julia,

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

To give you a lot of bad practise?

Cor



Re: best practice for transactions by Paul

Paul
Mon Nov 28 07:31:46 CST 2005

On Mon, 28 Nov 2005 01:38:03 -0800, "Julia" <Julia@discussions.microsoft.com> 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)

Re: best practice for transactions by Marina

Marina
Mon Nov 28 10:07:03 CST 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" <Julia@discussions.microsoft.com> wrote in message
news:C2180291-6D50-42F2-83A6-8AF2533DBB10@microsoft.com...
> 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



Re: best practice for transactions by Sahil

Sahil
Mon Nov 28 21:17:48 CST 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.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------




"Julia" <Julia@discussions.microsoft.com> wrote in message
news:C2180291-6D50-42F2-83A6-8AF2533DBB10@microsoft.com...
> 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