How to handle errors in Stored Procedures. I want to display
a message to the user in the .aspx page that is calling a
stored procedure in it's code behind. please help me.
Answers were Sorted based on User's Feedback
Answer / bru medishetty
You can use RaiseError or use the TRY CATCH Programming in
the Stored Procedure Code.
Thanks,
Bru Medishetty
www.LearnSQLWithBru,com
Is This Answer Correct ? | 2 Yes | 0 No |
With simple example:
begin try
declare @int int
set @int='select 1/0'
end try
begin catch
print 'Error detected with error number -'+convert(char
(10),@@error)
end catch
Is This Answer Correct ? | 1 Yes | 0 No |
What is ms sql server triggers?
How sql server enhances scalability of the database system?
Difference between Function and Stored Procedure?
What is Extended user-defined?
What is the diff between Static Queries and Dynamic queries give me some examples
If the job running very slow what is the action you do
How many clustered indexes there can be on table ?
What are scalar functions?
What is a covering index?
what is difference between nchar and char in Sql server ?
What will be query used to get the list of triggers in a database?
Every night you run a full backup after every 3 three hours you make a differential backup every hour you make an incremental backup in a worst-case scenario, how much work you can lose?