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
What is the difference between vb.net and vc#.net?
How do we access crystal reports in .net?
Can you explain what do you understand about web service?
Explain what is mutex?
What is your observations between vb.net and vc#.net?
Why you want to leave your previous company.
Why SOAP is required?
What is close method? How its different from finalize and dispose?
Differences between datagrid, datalist and repeater in .net?
What is file extension of Webservices in .Net?
Usually in .net, the clr takes care of memory management. Is there any need for a programmer to explicitly release memory and resources? If yes, why and how?
Explain difference between panel and groupbox classes using .net?
How boxing and unboxing occures in memory?
What are multicast delegates?
What is different between webusercontrol and in webcustomcontrol?