UserDefinedMessage Constructor (Server, Int32, String, Int32, String, Boolean)

Initializes a new instance of the UserDefinedMessage class on the specified instance of SQL Server, with the specified ID value, written in the specified language, the specified severity and actual message text, and the option to specify whether the message is logged to the Windows event log.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub New ( _
    server As Server, _
    id As Integer, _
    language As String, _
    severity As Integer, _
    message As String, _
    isLogged As Boolean _
)
'Usage
Dim server As Server
Dim id As Integer
Dim language As String
Dim severity As Integer
Dim message As String
Dim isLogged As Boolean

Dim instance As New UserDefinedMessage(server, _
    id, language, severity, message, isLogged)
public UserDefinedMessage(
    Server server,
    int id,
    string language,
    int severity,
    string message,
    bool isLogged
)
public:
UserDefinedMessage(
    Server^ server, 
    int id, 
    String^ language, 
    int severity, 
    String^ message, 
    bool isLogged
)
new : 
        server:Server * 
        id:int * 
        language:string * 
        severity:int * 
        message:string * 
        isLogged:bool -> UserDefinedMessage
public function UserDefinedMessage(
    server : Server, 
    id : int, 
    language : String, 
    severity : int, 
    message : String, 
    isLogged : boolean
)

Parameters

  • id
    Type: System.Int32
    An Int32 value that specifies the ID value that uniquely identifies the user-defined message.
  • language
    Type: System.String
    A String value that specifies the language in which the user-defined message is written.
  • severity
    Type: System.Int32
    An Int32 value that specifies the severity of the message.
  • isLogged
    Type: System.Boolean
    A Boolean value that specifies whether the user-defined message is logged to the Windows event log.
    If True, the message is logged.
    If False, the message is not logged.

Examples

Using Messages