.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

ASP.NET - Error Handling in Database Stored Procedures

Posted By: Sruthi Keerthi     Posted Date: September 22, 2009    Points:2   Category :ASP.Net
.
Hi,

Good morning.

Would you please let me know whether we need to write exception handling mechanism (Try, Catch blocks) in database stored procedures? Is it the best Practice? (As the corresponding error will be thrown to the calling ASP.NET application itself whenever an error occurs in the database stored procedure.)

Thanks and Regards..

Shruthi Keerthi.
.

Responses
Author: Venkat             
Posted Date: September 22, 2009     Points: 5   

Hi,

Yes its good idea to implement ERROR handler in stored procedure label in your business logic layer you should handle this or show this to user or as application demands.

below are some good tutorial to handle error in database label using SQL server

http://www.novicksoftware.com/TipsAndTricks/Tips-erorr-handling-in-a-stored-procedure.htm

http://www.sqlteam.com/article/handling-errors-in-stored-procedures

http://www.sommarskog.se/error-handling-II.html

Mark As Answer if this solve your problem
Warm Regards,
Venkat


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend