DtoSegments Collection
A collection of DtoSegment objects representing the segments of an index.
Properties
Methods
Add method
Remove method
Clear method
Remarks
Use the Count property to find the number of members in the collection.
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
See Also
DtoSegment Object
DtoTable Object
Methods Detail
Add method
Add an item to a collection.
Syntax
result = Collection.Add(Object)
Arguments
Return Values
Remarks
This method takes a parameter of type DtoSegment. Therefore, you are responsible for first instantiating the object and setting its properties before adding it to the collection.
*Note: You cannot use this method to add segments to preexisting PSQL tables. This method does not alter data or DDF files, and can only be used to add segments in memory before a table is created. See the example for AddTable method as a reference.
Remove method
Removes an item from a collection.
Syntax
result = Collection.Remove(segment)
Arguments
Return Values
Remarks
You can pass either the 1-based ordinal or the name of the segment.
*Note: You cannot use this method to remove segments from preexisting PSQL tables. This method does not alter data or DDF files, and can only be used to remove segments in memory before a table is created. See the example for AddTable method as a reference.
Clear method
Removes all items from a DtoSegments collection.
Syntax
result = Collection.Clear
Arguments
Return Values
Remarks
This method removes all the segments from an index in memory.
*Note: You cannot use this method to remove segments from preexisting PSQL tables. This method does not alter data or DDF files, and can only be used to remove segments in memory before a table is created. See the example for AddTable method as a reference.