Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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.

Answers were Sorted based on User's Feedback



How to handle errors in Stored Procedures. I want to display a message to the user in the .aspx pag..

Answer / bru medishetty

You can use RaiseError or use the TRY CATCH Programming in
the Stored Procedure Code.

Thanks,
Bru Medishetty
www.LearnSQLWithBru,com

Is This Answer Correct ?    2 Yes 0 No

How to handle errors in Stored Procedures. I want to display a message to the user in the .aspx pag..

Answer / 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

More SQL Server Interview Questions

What is the cartesian product of the table?

0 Answers  


Explain indexed views and partitioned view with their syntax.

0 Answers  


i have account table which consists of account name,card no and card no consists 16 digits now i want to retrieve the data if card no starts from 4 then it should print visa and if it starts from 5 then it should print master so plse help me to write simple query with out store procs .

3 Answers  


how many non clustered index in sql server 2008,2010,2012

2 Answers   Accenture,


How to avoid cursors?

3 Answers   CarrizalSoft Technologies, HP,






what is new philosophy for database devises for sql server 7.0? : Sql server database administration

0 Answers  


What is subquery explain with example?

0 Answers  


Explain what are the basic functions for master, msdb, model, tempdb databases?

0 Answers  


What is a join in sql? What are the types of joins?

0 Answers  


What are the two virtual tables SQL Server maintains for triggers?

3 Answers  


What is difference between drop truncate and delete?

0 Answers  


Difference between LEN() and DATALENGTH() in sql server ?

0 Answers   HCL,


Categories