共用方式為


GetServerName 方法

Gets the name of the instance of SQL Server with which the object is associated.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Protected Overridable Function GetServerName As String
'用途
Dim returnValue As String

returnValue = Me.GetServerName()
protected virtual string GetServerName()
protected:
virtual String^ GetServerName()
abstract GetServerName : unit -> string 
override GetServerName : unit -> string 
protected function GetServerName() : String

傳回值

型別:System. . :: . .String
A String value that specifies the name of the instance of SQL Server.

範例

呼叫方法