共用方式為


SQLMessageID Property

未來的 Microsoft SQL Server 版本將移除這項功能。請避免在新的開發工作中使用這項功能,並規劃修改目前使用這項功能的應用程式。

The SQLMessageID property identifies a Microsoft SQL Server error message by message number.

語法

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);

備註

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.