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 |
OPTIMIZATION OF SP,CURSOR,TRIGGERS
How do you debug a procedure in sql server?
What are tasks?
What are the types of database recovery models?
what is difference between having and where clause ?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
What do you understand by integration services in sql server?
1.Describe way(s) to tune the SQL table in order to optimize performance. 2. Explain SQL Injection and how can you prevent them?
What is the filtered index?
What is the fillfactor concept in indexes?
How do you send email on SQL Server?
what are the joins,primary key,foriegn key, candidate key, super key and expain them?