Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Give me a SQL Query to find out the second largest company?

1120


What is public role in sql server?

1066


State a few properties of relational databases?

1060


What is a join in sql?

1018


if no size is defined while creating the database, what size will the database have? : Sql server administration

933


How to encrypt Strored Procedure in SQL SERVER?

1097


What is optimization and its types?

912


but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration

920


When we should use @@error?

908


How to execute function in stored procedure sql server?

1045


Explain “not null constraint” in sql server?

955


How many databases can we create in a single server?

205


What are synonyms?

913


What are the differences between ms sql server & oracle?

992


How to execute the cursor queries with "open" statements?

1096