|
A collection of DtoSegment objects representing the segments of an index.
|
Count
|
Returns the number of members in a collection.
|
|
Item
|
Returns a specific member of a collection.
|
Use the Count property to find the number of members in the collection.
' Open dictionary Dim dictionary as new DtoDictionary Dim result as DtoResult result = dictionary.Open("c:\pvsw\demodata") ' 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
DtoSegment Object
DtoTable Object
Add an item to a collection.
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
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 Pervasive.SQL 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.
Removes an item from a collection.
|
Collection
|
DtoSegments collection from which to remove object.
|
|
segment
|
A variant containing either the index (starting with 1) or the name of the item you wish to remove from the collection
|
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
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 Pervasive.SQL 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.
Removes all items from a DtoSegments collection.
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
This method removes all the segments from an index in memory.
Note
You cannot use this method to remove segments from preexisting Pervasive.SQL 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.
|
Chapter contents
Prev topic: DtoIndex Object
|