Creating and Maintaining Catalogs and Dictionaries with DTO : DtoIndex Object
 
DtoIndex Object
This object represents an index for a table.
Properties
Flags
Gets or sets the column name for the index segment. This is an enumerated value. See Index Flags for a list of possible values.
Name
Gets or sets the name of the index.
Number
Gets or sets the 0-based number of the index.
Tag
Gets the index tag. It contains the names of all the columns that comprise the index.
Collections
DtoSegments Collection
Methods
None
Remarks
Only 119 segments are allowed per index. Note that the combined size of all the columns in segments of an index cannot be more then 255 bytes.
Only the last column in an index segment can have a partial index flag. Index segments that are not the last segment in the index and that use the partial index flag will have the partial flag ignored.
Example
’ Instantiate and open dictionary
Dim dictionary as new DtoDictionary
Dim result as DtoResult
result = dictionary.Open("d:\mydemodata")
 
’ Get STUDENT table from MYDEMODATA database
Dim students_table as DtoTable
Set students_table = dictionary.Tables("STUDENT")
 
’ Retrieve DEMODATA indexes collection
Dim students_idx as DtoIndexes
Set students_idx = students_table.Indexes
 
’ Get first index and determine its name
Dim first_idx as DtoIndex
Set first_idx = students_idx(1)
Dim index_name as String
index_name = first_idx.Name
See Also
DtoIndexes Collection
DtoSegments Collection