ServerConnection Constructor (String)

指定されたサーバー インスタンスを使用して、ServerConnection クラスの新しいインスタンスを初期化します。

名前空間: Microsoft.SqlServer.Management.Common
アセンブリ: Microsoft.SqlServer.ConnectionInfo (microsoft.sqlserver.connectioninfo.dll 内)

構文

'宣言
Public Sub New ( _
    serverInstance As String _
)
public ServerConnection (
    string serverInstance
)
public:
ServerConnection (
    String^ serverInstance
)
public ServerConnection (
    String serverInstance
)
public function ServerConnection (
    serverInstance : String
)

パラメータ

  • serverInstance
    接続を確立するサーバーのインスタンスの名前を示す String 値です。

解説

この名前空間、クラス、またはメンバは、Microsoft .NET Framework Version 2.0 でのみサポートされています。

使用例

'Connect to a remote instance of SQL Server.
Dim srv As Server
'The strServer string variable contains the name of a remote instance of SQL Server.
srv = New Server(strServer)
'The actual connection is made when a property is retrieved. 
Console.WriteLine(srv.Information.Version)
'The connection is automatically disconnected when the Server variable goes out of scope.

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

ServerConnection Class
ServerConnection Members
Microsoft.SqlServer.Management.Common Namespace

その他の技術情報

Visual Basic .NET で Windows 認証を使用して SQL Server のリモート インスタンスに接続する方法
SQL Server のインスタンスへの接続