Creating and Maintaining Catalogs and Dictionaries with DTO : DtoSegment Object
 
DtoSegment Object
This object represents a segment in an index.
Properties
ColumnName
Gets or sets the column name associated with this segment.
Flags
Gets or sets the segment flags. This is an enumerated value. See Segment Flags for a list of possible values.
Number
Gets or sets the 0-based segment number.
Methods
None
Remarks
One or more of these comprise an index. 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.
Example
’ Open dictionary
Dim dictionary as new DtoDictionary
Dim result as DtoResult
result = dictionary.Open("d:\mydemodata")
 
’ Get Students table
Dim students_table as DtoTable
Set students_table = dictionary.GetTable("Student")
 
’ Obtain indexes collection from students table
Dim students_idx as DtoIndexes
Set students_idx = students_table.Indexes
 
’ Delete all the indexes
Dim first_idx as DtoIndex
Set first_idx = students_idx(1)
 
’ Get DtoSegments collection from first_idx
Dim my_segments as DtoSegments
Set my_segments as first_idx.Segments
 
’ Get first segment and query column name
Dim first_seg as DtoSegment
Set first_seg = my_segments(1)
Dim colname as String
colname = first_seg.ColumnName
See Also
DtoSegments Collection
DtoTable Object
DtoIndexes Collection