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
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 |
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 |
explain how to create a new schema in a database? : Sql server database administration
How to convert numeric expression data types using the cast() function?
How to filter records of table in SQL SERVER?
0 Answers Petranics Solutions,
Which sql server table is used to hold the stored procedure script?
A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
whate is advantages of sql server 2000
What is the purpose of UPDATE STATISTICS?
I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?
You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?
What happens if null values are involved in arithmetic operations?
How many cores do I need for sql server 2016?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)