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


Please Help Members By Posting Answers For Below Questions

What is query optimization process?

512


Can we return Data from 4(more than 1) tables in stored procedure?

607


Why it is recommended to avoid referencing a floating point column in the where clause?

532


What is the difference between an index and a unique index?

540


What is the difference between clustered index and primary key?

498






What are alternate keys?

565


How do you Implement SSIS Packages in your Project?

1508


How do you delete a trigger?

572


What is sql server agent and what are the two modes of authentication in sql server?

535


Explain primary key in sql server?

561


Is mysql better than sql server?

532


Explain primary key?

533


What are the components of dbms?

521


What is the difference between getdate and sysdatetime?

525


What is key set driven?

528