Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi,

i have an doubthow to handle exceptions in database (sqlserver2008)
and also how to handle exception in stored procedures.
please give solutions.
Posted

1 solution

You can always TRY-CATCH in your stored procedures

Exception Handling in SQL Server[^]

Some more general info on error handling here

http://www.sommarskog.se/error-handling-I.html[^]

What you'll need to consider is what you should do when an exception is encountered. Do you have a client application that should be notified? Or perhaps you just need to log the details somewhere so you can find the problem and fix.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900