Distributed Tuning Objects Guide (v11)

DtoTables コレクション

DtoTable オブジェクトのコレクションを返します。

プロパティ

Count
コレクション内のメンバー数を返します。
Item
コレクションの特定のメンバーを返します。序数の値またはテーブル名を渡すことができます。

メソッド

なし

備考

このコレクションにはユーザー定義テーブルのみが含まれ、システム テーブルは含まれません。辞書は正常に開かれている必要があります。コレクションにテーブルを追加、あるいはコレクションからテーブルを削除するには、AddTable と DropTable を使用します。

Count プロパティを使用して DtoTables コレクション内のメンバー数を見つけます。

DtoDatabase の使用

Tables コレクションを取得する前に、まずデータベース オブジェクトに対して Open メソッドを実行する必要があります。これはそのデータベースにセキュリティが設定されていない場合でも必要です。

Dim m_session as new DtoSession 
Dim m_database as new DtoDatabase 
Dim table as new DtoTable 
Dim result as DtoResult 
 
result = m_session.Connect("server","user","password") 
m_database.Name = "demodata" 
m_database.Session = m_session 
'データベースを開く。データベースのセキュリティは 
'設定されていないことを前提とする。 
result = m_database.Open("","") 
 
For each table in m_database.Tables 
if table.Name = "Billing" then 
  'billing テーブルの検索 
End If 
next 
m_database.Close 'データベースを開いていた場合は閉じる 

DtoDictionary の使用

Dim dictionary as new DtoDictionary 
Dim table as new DtoTable 
Dim result as DtoResult 
Dim location as string 
 
'Mytable テーブルの場所を検索する 
result = dictionary.Open("d:¥MyDemodata") 
 
For Each table In dictionary.Tables 
   If table.Name = "Mytable" Then 
      location = table.Location 
      exit For 
   End If 
next 

関連項目

DtoDatabase オブジェクト

AddTable メソッド

DropTable メソッド

DtoTable オブジェクト


DtoDictionary オブジェクト

DtoTable オブジェクト