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...

What is the raise event used for?

Answer Posted / vini778

It is used for raising the error from sql statement
Eg shown below

IF @@TRANCOUNT>0 ROLLBACK TRANSACTION
Raise an error with the details of the
exception
DECLARE @ErrorMessage NVARCHAR
(
MAX
)
DECLARE @ErrorSeverity INT;
DECLARE
@ErrorState INT;
SELECT
@ErrorMessage=ERROR_MESSAGE
(
)
,
@ErrorSeverity=ERROR_SEVERITY
(
)
,
@ErrorState=ERROR_STATE
(
)
;
-- Use RAISERROR inside the CATCH
block to return error
-- information about the original
error that caused
-- execution to jump to the CATCH
block.
RAISERROR
(
@ErrorMessage,-- Message
text.
@ErrorSeverity,--
Severity.
@ErrorState -- State.
)
;

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the purpose of Remoting in .NET?

1141


One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?

970


What are the advantages of .net core?

985


What are the difference bbetween value type & reference types ? Example from .net. Integer & struct are value types or reference types in .net?

946


How to load a user control dynamically in runtime?

1057


What is view state in .net?

1030


What’s different between process and application in .net?

1079


What is "common language runtime" (clr) in .net?

1070


How is a managed code executed?

1423


What are the improvements made in cas in .net 4.0?

970


What is new in .net core?

931


What is connection pooling and how do you make your application use it?

1046


What is managed code and managed data in .net?

1084


What is the difference between web application and enterprise application?

1078


How will you load dynamic assembly? How will create assemblies at run time?

2133