Pros/Cons of using sqltransaction class vs sql server stored proce

G

Guest

Can anyone provide suggestions/recommendations of using either the
sqltransaction class for ado.net or a sql server stored procedure. we need
to using begin and end transactions to update mulitple tables?

asp.net app with sql server 2000 database
 
U

User

Mike Moore said:
Can anyone provide suggestions/recommendations of using either the
sqltransaction class for ado.net or a sql server stored procedure. we need
to using begin and end transactions to update mulitple tables?

asp.net app with sql server 2000 database

If all the (trans)action is on one server,
stored procedures no contest.
You don't want add another useless layer that brings no advantages, brings
possible bugs, and is less efficient.
 
J

John Bailo

Mike said:
Can anyone provide suggestions/recommendations of using either the
sqltransaction class for ado.net or a sql server stored procedure. we need
to using begin and end transactions to update mulitple tables?

asp.net app with sql server 2000 database

By all means, use SQL Transactions.

I find the use of stored procedures redundant and cumbersome, when I can
create my own data methods in c#.

What is more, for things like encasing the addition of child and parent
records in a single transaction, that can be committed or rolled back,
native c# code is an excellent and flexible way. For instance, if you
want to do any checks or interactions with your data, along the way to
inserting, you can do that easily but stored procedures make the whole
process way too 'chunky'.

And if you don't believe me, check out Yukon. It looks as if c# is
going to be the direct language of choice for manipulating the database!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top