This documentation is archived and is not being maintained.
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The SQLMessageID property identifies a Microsoft SQL Server error message by message number.
.SQLMessageID [= value]
An expression that evaluates to an object in the Applies To list
A long integer that identifies a SQL Server error message
HRESULT GetSQLMessageID(LPLONG pRetVal);
HRESULT SetSQLMessageID(long NewValue);
Set SQLMessageID to filter for jobs that, as part of processing, generate the error number specified. Set SQLMessageID to -1 to stop filtering by error message raised.