SqlConnectionStringBuilderとは? わかりやすく解説

SqlConnectionStringBuilder クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

SqlConnection クラス使用する接続文字列内容作成管理簡単に実行できるようにします。

名前空間: System.Data.SqlClient
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public NotInheritable Class
 SqlConnectionStringBuilder
    Inherits DbConnectionStringBuilder
Dim instance As SqlConnectionStringBuilder
public sealed class SqlConnectionStringBuilder
 : DbConnectionStringBuilder
public ref class SqlConnectionStringBuilder
 sealed : public DbConnectionStringBuilder
public final class SqlConnectionStringBuilder
 extends DbConnectionStringBuilder
public final class SqlConnectionStringBuilder
 extends DbConnectionStringBuilder
解説解説

接続文字列ビルダにより、クラスプロパティメソッド使用して構文的に正確な接続文字列プログラム作成したり、既存接続文字列解析および再構築したりできます接続文字列ビルダは、SQL Serverサポートする既知キー/値ペア対応した厳密に指定されプロパティ提供します接続文字列アプリケーション内で生成する必要がある場合SqlConnectionStringBuilder クラス使用して接続文字列生成および修正できますまた、このクラス利用することで、アプリケーション構成ファイル格納される接続文字列管理容易になります

SqlConnectionStringBuilder では、キー/値ペアが有効であるかどうかチェック実行されます。たがって、このクラス使った場合無効な接続文字列生成されることはありません。無効なペア追加しようとする例外スローさます。このクラスは、一連のシノニム対す固定コレクション保持しており、シノニムから対応する既知キー名への変換実行します

たとえば、Item プロパティで、必要なキー対応するシノニム含んだ文字列指定することによって値を取得できます。たとえば、Item プロパティRemove メソッドなど、キー名を含んだ文字列引数として受け取メンバ使用する場合、"Network Address" や "addr" など、接続文字列内のキーに対してサポートされシノニム指定できますサポートされすべてのシノニム一覧については、ConnectionString プロパティトピック参照してください

Item プロパティは、安全ではないエントリの挿入試みられ場合も、適切に処理します。たとえば、次のコードでは、既定Item プロパティ (C# ではインデクサ) を使用することで、入れ子になったキー/値ペアが適切にエスケープされています。

Dim builder As New System.Data.SqlClient.SqlConnectionStringBuilder
builder("Data Source") = "(local)"
builder("Integrated Security") = True
builder("Initial Catalog") = "AdventureWorks;NewValue=Bad"
Console.WriteLine(builder.ConnectionString)
System.Data.SqlClient.SqlConnectionStringBuilder builder =
  new System.Data.SqlClient.SqlConnectionStringBuilder();
builder["Data Source"] = "(local)";
builder["integrated Security"] = true;
builder["Initial Catalog"] = "AdventureWorks;NewValue=Bad";
Console.WriteLine(builder.ConnectionString);

結果次の接続文字列になり、無効な値は安全な方法処理されます。

Source=(local);Initial Catalog="AdventureWorks;NewValue=Bad";
Integrated Security=True
使用例使用例

次のコンソール アプリケーションでは、SQL Server 2005データベース使用される接続文字列作成します。このコードでは、SqlConnectionStringBuilder クラス使用して接続文字列作成しSqlConnectionStringBuilder インスタンスの ConnectionString プロパティを、接続クラスコンストラクタ渡してます。また、既存接続文字列解析し接続文字列内容に対して各種操作を行う例が示されています。

メモメモ

この例には、SqlConnectionStringBuilder接続文字列どのように連携するかを示すパスワード含まれています。アプリケーションでは、Windows 認証使用お勧めます。パスワード使用する必要がある場合は、ハードコーディングされたパスワードアプリケーション組み込まないください

Imports System.Data.SqlClient

Module Module1
    Sub Main()
        ' Create a new SqlConnectionStringBuilder and
        ' initialize it with a few name/value pairs:
        Dim builder As New
 SqlConnectionStringBuilder(GetConnectionString())

        ' The input connection string used the 
        ' Server key, but the new connection string uses
        ' the well-known Data Source key instead.
        Console.WriteLine(builder.ConnectionString)

        ' Pass the SqlConnectionStringBuilder an existing 
        ' connection string, and you can retrieve and
        ' modify any of the elements.
        builder.ConnectionString = _
            "server=(local);user id=ab;" & _
            "password=a!Pass113;initial catalog=AdventureWorks"
        ' Now that the connection string has been parsed,
        ' you can work with individual items.
        Console.WriteLine(builder.Password)
        builder.Password = "new@1Password"
        builder.AsynchronousProcessing = True

        ' You can refer to connection keys using strings, 
        ' as well. When you use this technique (the default
        ' Item property in Visual Basic, or the indexer in C#)
        ' you can specify any synonym for the connection string key
        ' name.
        builder("Server") = "."
        builder("Connect Timeout") = 1000

        ' The Item property is the default for the class, 
        ' and setting the Item property adds the value to the 
        ' dictionary, if necessary. 
        builder.Item("Trusted_Connection") = True
        Console.WriteLine(builder.ConnectionString)

        Console.WriteLine("Press Enter to finish.")
        Console.ReadLine()
    End Sub

    Private Function GetConnectionString()
 As String
        ' To avoid storing the connection string in your code,
        ' you can retrieve it from a configuration file. 
        Return "Server=(local);Integrated Security=SSPI;"
 & _
          "Initial Catalog=AdventureWorks"
    End Function
End Module
using System.Data;
using System.Data.SqlClient;

class Program
{
    static void Main()
    {
        // Create a new SqlConnectionStringBuilder and
        // initialize it with a few name/value pairs.
        SqlConnectionStringBuilder builder =
            new SqlConnectionStringBuilder(GetConnectionString());

        // The input connection string used the 
        // Server key, but the new connection string uses
        // the well-known Data Source key instead.
        Console.WriteLine(builder.ConnectionString);

        // Pass the SqlConnectionStringBuilder an existing 
        // connection string, and you can retrieve and
        // modify any of the elements.
        builder.ConnectionString = "server=(local);user id=ab;" +
            "password= a!Pass113;initial catalog=AdventureWorks";

        // Now that the connection string has been parsed,
        // you can work with individual items.
        Console.WriteLine(builder.Password);
        builder.Password = "new@1Password";
        builder.AsynchronousProcessing = true;

        // You can refer to connection keys using strings, 
        // as well. When you use this technique (the default
        // Item property in Visual Basic, or the indexer in C#),
        // you can specify any synonym for the connection string key
        // name.
        builder["Server"] = ".";
        builder["Connect Timeout"] = 1000;
        builder["Trusted_Connection"] = true;
        Console.WriteLine(builder.ConnectionString);

        Console.WriteLine("Press Enter to finish.");
        Console.ReadLine();
    }

    private static string
 GetConnectionString()
    {
        // To avoid storing the connection string in your code,
        // you can retrieve it from a configuration file. 
        return "Server=(local);Integrated Security=SSPI;"
 +
            "Initial Catalog=AdventureWorks";
    }
}
継承階層継承階層
System.Object
   System.Data.Common.DbConnectionStringBuilder
    System.Data.SqlClient.SqlConnectionStringBuilder
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlConnectionStringBuilder メンバ
System.Data.SqlClient 名前空間
その他の技術情報
接続文字列使用

SqlConnectionStringBuilder コンストラクタ ()


SqlConnectionStringBuilder コンストラクタ (String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

SqlConnectionStringBuilder クラス新しインスタンス初期化します。引数渡した接続文字列によって、インスタンス内部的接続情報データ提供されます。

名前空間: System.Data.SqlClient
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public Sub New ( _
    connectionString As String _
)
Dim connectionString As String

Dim instance As New SqlConnectionStringBuilder(connectionString)
public SqlConnectionStringBuilder (
    string connectionString
)
public:
SqlConnectionStringBuilder (
    String^ connectionString
)
public SqlConnectionStringBuilder (
    String connectionString
)
public function SqlConnectionStringBuilder
 (
    connectionString : String
)

パラメータ

connectionString

この情報を基にオブジェクト内部的接続情報生成されます。この情報解析され、名前/値のペアが生成されます。無効なキー名を指定すると、KeyNotFoundException が発生します

例外例外
解説解説
使用例使用例

次の例では、SQL Server単純な接続文字列を、SqlConnectionStringBuilder オブジェクトコンストラクタ指定し、そのオブジェクト含まれすべてのキー/値ペア反復処理しています。このコレクションには、各項目の既定値含まれる点に注意してくださいまた、SqlConnectionStringBuilder クラスは、常に一貫したキー名となるよう、既知キー対すシノニム変換されます。

メモメモ

この例には、SqlConnectionStringBuilder接続文字列どのように連携するかを示すパスワード含まれています。アプリケーションでは、Windows 認証使用お勧めます。パスワード使用する必要がある場合は、ハードコーディングされたパスワードアプリケーション組み込まないください

Imports System.Data.SqlClient

Module Module1
    Sub Main()
        Try
            Dim connectString As String
 = _
                "Server=(local);Database=AdventureWorks;UID=ab;Pwd=a!Pass@@"
            Console.WriteLine("Original: " & connectString)
            Dim builder As New
 SqlConnectionStringBuilder(connectString)
            Console.WriteLine("Modified: " & builder.ConnectionString)
            For Each key As
 String In builder.Keys
                Console.WriteLine(key & "=" &
 builder.Item(key).ToString)
            Next
            Console.WriteLine("Press any key to finish.")
            Console.ReadLine()

        Catch ex As System.Collections.Generic.KeyNotFoundException
            Console.WriteLine("KeyNotFoundException: "
 & ex.Message)
        Catch ex As System.FormatException
            Console.WriteLine("Format exception: "
 & ex.Message)
        End Try
    End Sub
End Module 
using System.Data.SqlClient;

class Program
{
    static void Main()
    {
        try
        {
            string connectString = 
                "Server=(local);Database=AdventureWorks;UID=ab;Pwd= a!Pass@@";
            Console.WriteLine("Original: " + connectString);
            SqlConnectionStringBuilder builder = 
                new SqlConnectionStringBuilder(connectString);
            Console.WriteLine("Modified: " + builder.ConnectionString);
            foreach (string key in
 builder.Keys)
                Console.WriteLine(key + "=" + builder[key].ToString());
            Console.WriteLine("Press any key to finish.");
            Console.ReadLine();

        }
        catch (System.Collections.Generic.KeyNotFoundException
 ex)
        {
            Console.WriteLine("KeyNotFoundException: " + ex.Message);
        }
        catch (System.FormatException ex)
        {
            Console.WriteLine("Format exception: " + ex.Message);
        }
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlConnectionStringBuilder クラス
SqlConnectionStringBuilder メンバ
System.Data.SqlClient 名前空間
その他の技術情報
接続文字列使用

SqlConnectionStringBuilder コンストラクタ

SqlConnectionStringBuilder クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
SqlConnectionStringBuilder () SqlConnectionStringBuilder クラス新しインスタンス初期化します。
SqlConnectionStringBuilder (String) SqlConnectionStringBuilder クラス新しインスタンス初期化します。引数渡した接続文字列によって、インスタンス内部的接続情報データ提供されます。
参照参照

関連項目

SqlConnectionStringBuilder クラス
SqlConnectionStringBuilder メンバ
System.Data.SqlClient 名前空間

SqlConnectionStringBuilder プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ ApplicationName 接続文字列関連付けられたアプリケーションの名前を取得または設定します
パブリック プロパティ AsynchronousProcessing この接続文字列使用して作成される接続非同期処理許可されるかどうかを示すブール値を取得または設定します
パブリック プロパティ AttachDBFilename プライマリ ファイルの名前を格納する文字列取得または設定します接続可能なデータベースへの完全パス名が使用されます。
パブリック プロパティ BrowsableConnectionString  ConnectionString プロパティVisual Studio デザイナ表示できるかどうか指定する値を取得または設定します。 ( DbConnectionStringBuilder から継承されます。)
パブリック プロパティ ConnectionReset 接続接続プールか取得したときに、接続リセットされかどうかを示すブール値を取得または設定します
パブリック プロパティ ConnectionString  DbConnectionStringBuilder に関連付けられる接続文字列取得または設定します。 ( DbConnectionStringBuilder から継承されます。)
パブリック プロパティ ConnectTimeout 接続タイムアウト取得または設定します
パブリック プロパティ ContextConnection SQL Server対しクライアント/サーバー接続を行うか、インプロセス接続を行うかを示す値を取得または設定します
パブリック プロパティ Count  ConnectionString プロパティ格納されている、現在のキー数を取得します。 ( DbConnectionStringBuilder から継承されます。)
パブリック プロパティ CurrentLanguage SQL Server Language レコード名を取得または設定します
パブリック プロパティ DataSource 接続する SQL Serverインスタンスの名前またはネットワーク アドレス取得または設定します
パブリック プロパティ Encrypt サーバー証明書インストールされている場合に、SQL Serverクライアントサーバーの間で送信されるすべてのデータSSL 暗号化使用するかどうかを示すブール値を取得または設定します
パブリック プロパティ Enlist SQL Server接続プーラーが、作成スレッド現在のトランザクション コンテキストに、接続自動的に登録するかどうかを示すブール値を取得または設定します
パブリック プロパティ FailoverPartner プライマリ サーバーダウンした場合接続するサーバーの名前またはアドレス取得または設定します
パブリック プロパティ InitialCatalog 接続関連付けられたデータベースの名前を取得または設定します
パブリック プロパティ IntegratedSecurity User ID および Password接続文字列中に指定するか (false場合)、現在の Windows アカウント資格情報認証使用するか (true場合) を示すブール値を取得または設定します
パブリック プロパティ IsFixedSize オーバーライドされます。 SqlConnectionStringBuilder が固定サイズかどうかを示す値を取得します
パブリック プロパティ IsReadOnly  DbConnectionStringBuilder読み取り専用かどうかを示す値を取得します。 ( DbConnectionStringBuilder から継承されます。)
パブリック プロパティ Item オーバーライドされます指定したキー関連付けられている値を取得または設定しますC# では、このプロパティインデクサです。
パブリック プロパティ Keys オーバーライドされますSqlConnectionStringBuilder 内のキー格納している ICollection を取得します
パブリック プロパティ LoadBalanceTimeout 接続プール維持されている接続破棄されるまでの最短時間 (秒) を取得または設定します
パブリック プロパティ MaxPoolSize 特定の接続文字列について、接続プール維持できる最大接続数を取得または設定します
パブリック プロパティ MinPoolSize 特定の接続文字列について、接続プール維持できる最小接続数を取得または設定します
パブリック プロパティ MultipleActiveResultSets 複数アクティブ結果セットを、対応する接続関連付けることができるかどうかを示すブール値を取得または設定します
パブリック プロパティ NetworkLibrary SQL Server との接続確立するためのネットワーク ライブラリ名を保持する文字列取得または設定します
パブリック プロパティ PacketSize SQL Serverインスタンス通信するために使用するネットワーク パケットサイズ (バイト単位) を取得または設定します
パブリック プロパティ Password SQL Serverアカウント使用するパスワード取得または設定します
パブリック プロパティ PersistSecurityInfo 接続開いているか、開いている状態になったことがある場合に、パスワードなどの機密性の高い情報接続文字列一部として返すかどうかを示すブール値を取得または設定します
パブリック プロパティ Pooling 接続プールするか、要求ごとに明示的に接続確立するかを示すブール値を取得または設定します
パブリック プロパティ Replication この接続使用したレプリケーションサポートするかどうかを示すブール値を取得または設定します
パブリック プロパティ TrustServerCertificate 信頼関係検証するための証明チェーンウォークバイパスする間にチャネル暗号化するかどうかを示す値を取得または設定します
パブリック プロパティ TypeSystemVersion アプリケーション想定される型システムを表す文字列値を取得または設定します
パブリック プロパティ UserID SQL Server との接続時に使用するユーザー ID取得または設定します
パブリック プロパティ UserInstance SQL Server Express既定インスタンスから、呼び出し元のアカウント実行時開始されるインスタンス接続リダイレクトするかどうかを示す値を取得または設定します
パブリック プロパティ Values オーバーライドされますSqlConnectionStringBuilder 内の値を格納している ICollection取得します
パブリック プロパティ WorkstationID SQL Server接続するワークステーションの名前を取得または設定します
参照参照

関連項目

SqlConnectionStringBuilder クラス
System.Data.SqlClient 名前空間

その他の技術情報

接続文字列使用

SqlConnectionStringBuilder メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add  指定したキーおよび値を持つエントリを DbConnectionStringBuilder に追加します。 ( DbConnectionStringBuilder から継承されます。)
パブリック メソッド AppendKeyValuePair  オーバーロードされます効率的かつ安全に既存の StringBuilder オブジェクトキーと値を追加できます。 ( DbConnectionStringBuilder から継承されます。)
パブリック メソッド Clear オーバーライドされます。 SqlConnectionStringBuilder インスタンス内容消去します。
パブリック メソッド ContainsKey オーバーライドされますSqlConnectionStringBuilder特定のキー格納されているかどうか判断します
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド EquivalentTo  この DbConnectionStringBuilder オブジェクト内の接続情報と、指定したオブジェクト内の接続情報比較します。 ( DbConnectionStringBuilder から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Remove オーバーライドされます指定したキーを持つエントリを SqlConnectionStringBuilder インスタンスか削除します
パブリック メソッド ShouldSerialize オーバーライドされます指定されキーが、この SqlConnectionStringBuilder インスタンス存在するかどうか示します
パブリック メソッド ToString  この DbConnectionStringBuilder関連付けられている接続文字列返します。 ( DbConnectionStringBuilder から継承されます。)
パブリック メソッド TryGetValue オーバーライドされます指定されキー対応する値を SqlConnectionStringBuilder から取得します
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SqlConnectionStringBuilder クラス
System.Data.SqlClient 名前空間

その他の技術情報

接続文字列使用

SqlConnectionStringBuilder メンバ

SqlConnection クラス使用する接続文字列内容作成管理簡単に実行できるようにします。

SqlConnectionStringBuilder データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SqlConnectionStringBuilder オーバーロードされます。 SqlConnectionStringBuilder クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ ApplicationName 接続文字列関連付けられたアプリケーションの名前を取得または設定します
パブリック プロパティ AsynchronousProcessing この接続文字列使用して作成される接続非同期処理許可されるかどうかを示すブール値を取得または設定します
パブリック プロパティ AttachDBFilename プライマリ ファイルの名前を格納する文字列取得または設定します接続可能なデータベースへの完全パス名が使用されます。
パブリック プロパティ BrowsableConnectionString  ConnectionString プロパティVisual Studio デザイナ表示できるかどうか指定する値を取得または設定します。(DbConnectionStringBuilder から継承されます。)
パブリック プロパティ ConnectionReset 接続接続プールか取得したときに、接続リセットされかどうかを示すブール値を取得または設定します
パブリック プロパティ ConnectionString  DbConnectionStringBuilder関連付けられる接続文字列取得または設定します。(DbConnectionStringBuilder から継承されます。)
パブリック プロパティ ConnectTimeout 接続タイムアウト取得または設定します
パブリック プロパティ ContextConnection SQL Server対しクライアント/サーバー接続を行うか、インプロセス接続を行うかを示す値を取得または設定します
パブリック プロパティ Count  ConnectionString プロパティ格納されている、現在のキー数を取得します。(DbConnectionStringBuilder から継承されます。)
パブリック プロパティ CurrentLanguage SQL Server Language レコード名を取得または設定します
パブリック プロパティ DataSource 接続する SQL Serverインスタンスの名前またはネットワーク アドレス取得または設定します
パブリック プロパティ Encrypt サーバー証明書インストールされている場合に、SQL Serverクライアントサーバーの間で送信されるすべてのデータSSL 暗号化使用するかどうかを示すブール値を取得または設定します
パブリック プロパティ Enlist SQL Server接続プーラーが、作成スレッド現在のトランザクション コンテキストに、接続自動的に登録するかどうかを示すブール値を取得または設定します
パブリック プロパティ FailoverPartner プライマリ サーバーダウンした場合接続するサーバーの名前またはアドレス取得または設定します
パブリック プロパティ InitialCatalog 接続関連付けられたデータベースの名前を取得または設定します
パブリック プロパティ IntegratedSecurity User ID および Password接続文字列中に指定するか (false場合)、現在の Windows アカウント資格情報認証使用するか (true場合) を示すブール値を取得または設定します
パブリック プロパティ IsFixedSize オーバーライドされますSqlConnectionStringBuilder固定サイズかどうかを示す値を取得します
パブリック プロパティ IsReadOnly  DbConnectionStringBuilder読み取り専用かどうかを示す値を取得します。(DbConnectionStringBuilder から継承されます。)
パブリック プロパティ Item オーバーライドされます指定したキー関連付けられている値を取得または設定しますC# では、このプロパティインデクサです。
パブリック プロパティ Keys オーバーライドされますSqlConnectionStringBuilder 内のキー格納している ICollection を取得します
パブリック プロパティ LoadBalanceTimeout 接続プール維持されている接続破棄されるまでの最短時間 (秒) を取得または設定します
パブリック プロパティ MaxPoolSize 特定の接続文字列について、接続プール維持できる最大接続数を取得または設定します
パブリック プロパティ MinPoolSize 特定の接続文字列について、接続プール維持できる最小接続数を取得または設定します
パブリック プロパティ MultipleActiveResultSets 複数アクティブ結果セットを、対応する接続関連付けることができるかどうかを示すブール値を取得または設定します
パブリック プロパティ NetworkLibrary SQL Server との接続確立するためのネットワーク ライブラリ名を保持する文字列取得または設定します
パブリック プロパティ PacketSize SQL Serverインスタンス通信するために使用するネットワーク パケットサイズ (バイト単位) を取得または設定します
パブリック プロパティ Password SQL Serverアカウント使用するパスワード取得または設定します
パブリック プロパティ PersistSecurityInfo 接続開いているか、開いている状態になったことがある場合に、パスワードなどの機密性の高い情報接続文字列一部として返すかどうかを示すブール値を取得または設定します
パブリック プロパティ Pooling 接続プールするか、要求ごとに明示的に接続確立するかを示すブール値を取得または設定します
パブリック プロパティ Replication この接続使用したレプリケーションサポートするかどうかを示すブール値を取得または設定します
パブリック プロパティ TrustServerCertificate 信頼関係検証するための証明チェーンウォークバイパスする間にチャネル暗号化するかどうかを示す値を取得または設定します
パブリック プロパティ TypeSystemVersion アプリケーション想定される型システムを表す文字列値を取得または設定します
パブリック プロパティ UserID SQL Server との接続時に使用するユーザー ID取得または設定します
パブリック プロパティ UserInstance SQL Server Express既定インスタンスから、呼び出し元のアカウント実行時開始されるインスタンス接続リダイレクトするかどうかを示す値を取得または設定します
パブリック プロパティ Values オーバーライドされますSqlConnectionStringBuilder 内の値を格納している ICollection取得します
パブリック プロパティ WorkstationID SQL Server接続するワークステーションの名前を取得または設定します
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add  指定したキーおよび値を持つエントリを DbConnectionStringBuilder に追加します。 (DbConnectionStringBuilder から継承されます。)
パブリック メソッド AppendKeyValuePair  オーバーロードされます効率的かつ安全に既存の StringBuilder オブジェクトキーと値を追加できます。 (DbConnectionStringBuilder から継承されます。)
パブリック メソッド Clear オーバーライドされますSqlConnectionStringBuilder インスタンス内容消去します。
パブリック メソッド ContainsKey オーバーライドされますSqlConnectionStringBuilder特定のキー格納されているかどうか判断します
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド EquivalentTo  この DbConnectionStringBuilder オブジェクト内の接続情報と、指定したオブジェクト内の接続情報比較します。 (DbConnectionStringBuilder から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Remove オーバーライドされます指定したキーを持つエントリを SqlConnectionStringBuilder インスタンスか削除します
パブリック メソッド ShouldSerialize オーバーライドされます指定されキーが、この SqlConnectionStringBuilder インスタンス存在するかどうか示します
パブリック メソッド ToString  この DbConnectionStringBuilder関連付けられている接続文字列返します。 (DbConnectionStringBuilder から継承されます。)
パブリック メソッド TryGetValue オーバーライドされます指定されキー対応する値を SqlConnectionStringBuilder から取得します
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SqlConnectionStringBuilder クラス
System.Data.SqlClient 名前空間

その他の技術情報

接続文字列使用


このページでは「.NET Framework クラス ライブラリ リファレンス」からSqlConnectionStringBuilderを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSqlConnectionStringBuilderを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSqlConnectionStringBuilderを検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SqlConnectionStringBuilder」の関連用語

SqlConnectionStringBuilderのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlConnectionStringBuilderのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS