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 recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
How to delete all rows with truncate table statement in ms sql server?
What is data compression?
What are different types of data sources?
whats new about truncate in sql server 2008?
How can we delete Duplicate row in table?
What is temporal data type?
How to return the date part only from a sql server datetime datatype?
Is it possible to update the views? If yes, how, if not, why?
Can two tables share a primary key?
What happens to a statement batch if there is a compilation error?
What are the rules to use the rowguidcol property to define a globally unique identifier column?
What is lock escalation and what is its purpose?
whats the maximum size of view state??
what are triggers? : Sql server database administration