MS SQL |
The Database Engine can return information to the caller in one of two ways: |
SqlClient Error Handling |
The SqlClient managed provider throws an SqlException exception when an unhandled error is raised by the SQL Server Database Engine. Through the SqlException class, applications can retrieve information about errors produced on the server side, including error number, error message, error severity, and other exception context information. For processing warnings or informational messages sent by the SQL Server Database Engine, applications can create a SqlInfoMessageEventHandler delegate to listen for the InfoMessage event on the SqlConnection class. Similar to the exception case, message context information such as severity and state are passed as arguments to the callback. |
Raising Error message – stored procedure Example |
ALTER PROCEDURE dbo.SenTest RETURN 0 |
Thursday, December 20, 2007
Handling Errors and Messages in Applications SQL
Posted by Sen SD at 6:25 AM
Labels: Microsoft Technologies
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment