sureshcd10 Posted March 15, 2006 Posted March 15, 2006 We can create transactions at the -->codebehind level by making use of SqlTransaction class or in then -->StoredProcedure level so that we can create save point and Rollback a transaction whenever a transaction fails Now my question is is there any specific advantage/disadvantage in using Sqltransaction at the Codebehind against using the same at the storedProcedure level. I am using C# to develop aspx pages and SQLServer2000 as database Which one is the best option and WHy ? :confused: Thank u all in advance Quote ima
shaul_ahuva Posted March 18, 2006 Posted March 18, 2006 There's no "better" one, although the SqlTransaction object DOES provide you the ability to do other things within the context of a transaction (such as saving an image to the file system). Quote
Jay1b Posted March 20, 2006 Posted March 20, 2006 Stored procedures are precompiled into the database so they will run slightly faster. Quote
Puiu Posted March 20, 2006 Posted March 20, 2006 Stored procedures are precompiled into the database so they will run slightly faster. I knew there was no pre-compilation for the stored procs. They are compiled when when they are used, just like any other query. The difference is that the execution (query) plan for the stored proc is easyer to retrieve from the cache (or at least this is what i know) Quote
Jay1b Posted March 20, 2006 Posted March 20, 2006 To a degree, stored procedures are at least partially precompiled and will run faster then standard queries in every case. (assuming all things are equal). Quote
Puiu Posted March 21, 2006 Posted March 21, 2006 To a degree' date=' stored procedures [u']are[/u] at least partially precompiled and will run faster then standard queries in every case. (assuming all things are equal). Is this true for the stored procedures that have parameters also ? Quote
Jay1b Posted March 21, 2006 Posted March 21, 2006 Yes. Added extra characters due to gay minimum character count :( Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.