共用方式為


ReportError (clsDatabase)

[!附註]

  下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。

This event is called whenever a processing error occurs.

Applies To:clsDatabase

語法

ReportError(obj As Object, ByVal Action As Integer, ByVal ErrorCode As Long, ByVal Message As String, Cancel As Boolean)

參數

  • obj
    Refers to the object being processed or the target object of the action.

  • Action
    Refers to the processing action that has been completed.

  • ErrorCode
    A value in the ErrorCodes enumeration.

  • Message
    A user friendly message describing the error.

  • Cancel
    Allows the application to cancel an action by setting this parameter to True.

備註

This event is called whenever an error occurs during processing.

For more information about using this event, see Events.