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
Tell me what do you understand by a view? What does the with check option clause for a view do?
what purpose does the model database serve? : Sql server database administration
Can you insert NULL in unique column?
What are views used for?
Explain about merge replications?
Is t sql the same as sql server?
Explain what role entity and relationship play in an ER diagram.
What is the difference between function and stored procedure in sql server?
What are pessimistic lock and optimistic lock?
What is join and name different type of joins?
What do you mean by tablesample?
What is the sql case statement used for?
What is database dimension? : sql server analysis services, ssas
Please explain what is “asynchronous” communication in sql server service broker?
How to get @@error and @@rowcount at the same time?