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 |
How are the exceptions handled in sql server programming?
List the various tools available for performance tuning?
What is the xml datatype?
How would you use user_constraints table in DB?
What is database replicaion? What are the different types of replication you can set up in SQL Server?
5 Answers Aptech, HCL, Perpetual, SAIC,
what are constraints? Explain different types of constraints? : Sql server database administration
What is a covering index?
What is the difference between mysql and sql server?
In what three ways is the return statement used in a stored procedure?
Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?
How to add a new column to an existing table with "alter table ... Add" in ms sql server?
How to divide query output into multiple groups with the group by clause in ms sql server?
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)