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 to modify the underlying query of an existing view?
What is difference between delete & truncate commands?
which backup strategy you are following at ur company
What happens if null values are involved in string operations?
What are subqueries in sql server? Explain its properties.
If i have one transaction say mainTransaction, within this mainTransaction i have another two transaction say t1 and t2. Now while execution t1 completes successfully and commit statement fires, but while executing t2 some error occurs and rollback statement fires. What happen to t1, is it rollback or not?
Mention the differences between having and where clause.
Lets say due to N/W or Security issues client is not able to connect to server or vice versa. How do you troubleshoot?
what is a check constraint?
How we Resize table,temp table, database and log file size in SQL Server 2005
What is a join in sql? What are the types of joins?
What do you mean by acid?
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)