Developer Reference : Platform Management : Distributed Tuning Objects (DTO) Guide : Creating and Maintaining Catalogs and Dictionaries with DTO : DtoTables Collection
 
DtoTables Collection
Returns a collection of DtoTable objects.
Properties
Count
Returns the number of members in a collection.
Item
Returns a specific member of a collection. You can pass an ordinal value or a table name.
Methods
None
Remarks
This collection only includes the user defined tables and does not include system tables. The dictionary has to be successfully opened. In order to add or drop tables from the collection use AddTable and DropTable.
Use the Count property to find the number of members in the DtoTables collection.
Example
Using DtoDatabase
Before obtaining the Tables collection, you must first invoke the Open method on the database object, even if the database is not secured.
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
' Open database, assuming database not secured
result = m_database.Open(“”,“”)
 
For each table in m_database.Tables
if table.Name = “Billing” then
‘ found the billing table
End If
next
m_database.Close ‘ close the db if you open it
Using DtoDictionary
Dim dictionary as new DtoDictionary
Dim table as new DtoTable
Dim result as DtoResult
Dim location as string
 
'find location of Mytable table
result = dictionary.Open("d:\MyDemodata")
 
For Each table In dictionary.Tables
If table.Name = "Mytable" Then
location = table.Location
exit For
End If
next
See Also
DtoDatabase Object
AddTable method
DropTable method
DtoTable Object