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 query optimization process?
Can we return Data from 4(more than 1) tables in stored procedure?
Why it is recommended to avoid referencing a floating point column in the where clause?
What is the difference between an index and a unique index?
What is the difference between clustered index and primary key?
What are alternate keys?
How do you Implement SSIS Packages in your Project?
How do you delete a trigger?
What is sql server agent and what are the two modes of authentication in sql server?
Explain primary key in sql server?
Is mysql better than sql server?
Explain primary key?
What are the components of dbms?
What is the difference between getdate and sysdatetime?
What is key set driven?