SQLMessageID Property

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.

Syntax

object
.SQLMessageID [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list

  • value
    A long integer that identifies a SQL Server error message

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetSQLMessageID(LPLONG pRetVal);
HRESULT SetSQLMessageID(long NewValue);

Remarks

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.