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
A developer company sends dlls to the client. Some client is not happy current functionality, so request some modification. Developer made some changes and send new dll to all clients. Some client is happy with old version, tell me minimal change to so that neither clients get affected?
What is operator overloading in .net?
Name the classes that are introduced in the system.numerics namespace.
Tell us what is the native image generator?
Explain .net framework overview?
What is the advantage of .net core?
Please explain what is reflection and what is it for?
How do I spawn a thread?
What are the purposes of using .net?
what is prototype design pattern in .net
Which namespace does it belong to by default?
What’s different between process and application in .net?
Explain about the Common Language Runtime?
Explain what is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?
What is your observations between vb.net and vc#.net?