クライアントインターフェイスガイド > TDV用TIBCO ADO .NET 2020データプロバイダー > スキーマ検出 > 接続プロパティ
 
接続プロパティ
ConnectionPropertiesスキーマコレクションをクエリすることにより、使用可能な接続プロパティおよび接続文字列に設定されている接続プロパティに関する情報にプログラムでアクセスできます。
接続プロパティ情報の取得
ConnectionPropertiesスキーマコレクションを取得するには、CompositeConnectionクラスのGetSchemaメソッドを呼び出します。返されたDataTableの結果にアクセスします。
 
C#
 
DbProviderFactory provider = DbProviderFactories.GetFactory("System.Data.CompositeClient");
using(DbConnection conn = provider.CreateConnection()) {
conn.Open();
DataTable databaseSchema = conn.GetSchema("ConnectionProperties");
foreach (DataRow row in databaseSchema.Rows) {
Console.WriteLine(row["Name"]);
Console.WriteLine(row["Type"]);
Console.WriteLine(row["ShortDescription"]);
}
}
VB.NET
 
Dim provider = DbProviderFactories.GetFactory("System.Data.CompositeClient")
Using conn As DbConnection = provider.CreateConnection()
conn.Open()
Dim databaseSchema As DataTable = conn.GetSchema("ConnectionProperties")
For Each row As DataRow In databaseSchema.Rows
Console.WriteLine(row("Name"))
Console.WriteLine(row("Type"))
Console.WriteLine(row("ShortDescription"))
Next
End Using
返された列
ConnectionPropertiesスキーマコレクションには、次の情報が含まれています。
 
列名
データタイプ
説明
名前
System.String
接続プロパティの名前。
簡単な説明
System.String
接続プロパティの説明。
[Type(タイプ)]
System.String
データタイプ。
System.String
許可される値。
デフォルト
System.String
ユーザーが設定していない場合のデフォルト値。
カテゴリ
System.String
関連する接続プロパティをグループ化するカテゴリ。
必須
System.String
プロパティが接続する必要があるかどうか。
System.String
接続プロパティの現在の値。