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
Give me a SQL Query to find out the second largest company?
What is public role in sql server?
State a few properties of relational databases?
What is a join in sql?
if no size is defined while creating the database, what size will the database have? : Sql server administration
How to encrypt Strored Procedure in SQL SERVER?
What is optimization and its types?
but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration
When we should use @@error?
How to execute function in stored procedure sql server?
Explain “not null constraint” in sql server?
How many databases can we create in a single server?
What are synonyms?
What are the differences between ms sql server & oracle?
How to execute the cursor queries with "open" statements?