Server.SystemMessages Property
Represents a collection of SystemMessage objects. Each SystemMessage object represents a system message defined on the instance of Microsoft SQL Server.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
語法
'宣告
Public ReadOnly Property SystemMessages As SystemMessageCollection
public SystemMessageCollection SystemMessages { get; }
public:
property SystemMessageCollection^ SystemMessages {
SystemMessageCollection^ get ();
}
/** @property */
public SystemMessageCollection get_SystemMessages ()
public function get SystemMessages () : SystemMessageCollection
屬性值
A SystemMessageCollection object that represents all the system messages defined on the instance of SQL Server.
備註
更新的文字:
The SystemMessages property points to the SystemMessageCollection object, which references the system messages on the instance of SQL Server. You can use the collection to reference the predefined system messages. Use the UserDefinedMessages property to access user-defined messages.
只有 Microsoft .NET Framework 2.0 版支援此命名空間、類別或成員。
範例
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Reference an existing system message using the ItemByIdAndLanguage method.
Dim msg As SystemMessage
msg = srv.SystemMessages.ItemByIdAndLanguage(14126, "us_english")
'Display the message ID and text.
Console.WriteLine(msg.ID.ToString + " " + msg.Text)
執行緒安全性
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
Server Class
Server Members
Microsoft.SqlServer.Management.Smo Namespace
其他資源
How to: Find a Particular System Message in Visual Basic .NET
How to: Reference an Object by Using a Collection in Visual Basic .NET
Using Collections
Setting Properties
管理伺服器