Search results
26 mar 2015 · An example of this exception is: Violation of UNIQUE KEY constraint 'AK_AdvanceShipmentNotices_CustomerId_PurchaseOrderNumber'. Cannot insert duplicate key in object 'dbo.AdvanceShipmentNotices'. The duplicate key value is (4, 1000).
Consult this SQL Server error code list (between 0 and 999) to find explanations for error messages for SQL Server database engine events.
10 paź 2024 · Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
29 gru 2022 · Constructs a message from an existing message in sys.messages or from a provided string. The functionality of FORMATMESSAGE resembles that of the RAISERROR statement. However, RAISERROR prints the message immediately, while FORMATMESSAGE returns the formatted message for further processing.
The RAISERROR statement allows you to generate your own error messages and return these messages back to the application using the same format as a system error or warning message generated by SQL Server Database Engine.
15 cze 2018 · This article explains how to implement SQL error handling using the SQL server try-catch statement and what can be done in general when an error occurs in SQL Server
21 lip 2020 · You can take advantage of this built-in exception handling mechanism in SQL Server to rollback transactions when an error has occurred or use it in DML statements (INSERT, UPDATE and DELETE) to check for errors and handle it gracefully.