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 |
What is row_number () and partition by in sql server?
What is a result set object returned by odbc_exec()?
What do you mean by SQL injection attack?
Can a unique index be created on a column, which contains null?
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
what is difference between nchar and char in Sql server ?
What is difference between drop truncate and delete?
How to delete particular value in the column of a table.Is it possible or not?if possible give it as in query.
Explain hostprotectionattribute in sql server 2005?
How to delete an existing row with delete statements in ms sql server?
What is hot add cpu in sql server 2008?
How do clustered indexes store data?
Oracle (3259)
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)