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.
Answer Posted / veeresh kethari
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 |
Post New Answer View All Answers
What is sparse columns of sql server 2008?
What is the full form of ddl?
How to execute function in stored procedure sql server?
Explain indexed views?
Name 3 ways to get an accurate count of the number of records in a table?
What is an expensive query?
What is the difference between char, varchar and nvarchar?
List out some of the requirements to set up a sql server failover cluster?
Tell me the use of keyword with encryption. Create a store procedure with encryption?
what is datawarehouse?
Explain iaas, paas and saas?
Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?
What is the difference between Stored Procedures and triggers?
How to call a function from a stored procedure in SQL Server ?
Mention the different types of triggers?