.Indexes
制限配列の 3 番目のメンバーを取得すると、テーブル名ではなく、インデックス名に対応するように見えます。したがって、特定のテーブルのインデックスを取得するには、すべてのインデックス (制限なし) を取得してから、不要なものを除外する必要があるようです。
次のC#コードは私にとってはうまくいきます:
using (OleDbConnection con = new OleDbConnection())
{
con.ConnectionString = myConnectionString;
con.Open();
object[] restrictions = new object[3];
System.Data.DataTable table = con.GetOleDbSchemaTable(OleDbSchemaGuid.Indexes, restrictions);
// Display the contents of the table.
foreach (System.Data.DataRow row in table.Rows)
{
string tableName = row[2].ToString();
if (tableName == "Clients")
{
foreach (System.Data.DataColumn col in table.Columns)
{
Console.WriteLine("{0} = {1}",
col.ColumnName, row[col]);
}
Console.WriteLine("============================");
}
}
con.Close();
}