Creating and Maintaining Catalogs and Dictionaries with DTO : DtoColumns Collection
 
DtoColumns Collection
A collection of DtoColumn objects representing all the columns in a table.
Properties
Count
Returns the number of members in a collection.
Item
Returns a specific member of a DtoColumns collection.
Methods
Add method
Remove method
Clear method
Remarks
You obtain this collection from a property of the DtoTable Object object.
Use the Count property to find the number of members in the collection.
Example
Dim dictionary as new DtoDictionary
dictionary.Open("d:\MyDemodata")
students_table = dictionary.GetTable("STUDENT")
students_cols = students_table.Columns
See Also
DtoIndexes Collection
DtoColumn Object
DtoTable Object
Methods Detail
Add method
Add an item to a DtoColumns collection.
Syntax
status = Collection.Add(Object)
Arguments
Collection
DtoColumns collection to which to add object.
Object
A new DtoColumn object.
Return Values
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.
Remarks
This method takes a parameter of type DtoColumn. 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 columns to preexisting PSQL tables. This method does not alter data or DDF files, and can only be used to add columns in memory before a table is created. See the example for AddTable method as a reference.
Remove method
Removes an item from a DtoColumns collection.
Syntax
Collection.Remove(column)
Arguments
Collection
DtoColumns collection from which to remove object.
column
A variant containing either the index (starting with 1) or the name of the item you wish to remove from the DtoColumns collection
Return Values
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.
Remarks
You can pass either a column name or the 1-based ordinal of the item in the DtoColumns collection.
Note You cannot use this method to remove columns from preexisting PSQL tables. This method does not alter data or DDF files, and can only be used to remove columns in memory before a table is created. See the example for AddTable method as a reference.
Clear method
Removes all items from a DtoColumns collection.
Syntax
result = Collection.Clear
Arguments
In
Collection
DtoColumns or DtoIndexes collection obtained from a DtoTable object
Return Values
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.
Remarks
This method removes all the columns from a table in memory.
Note You cannot use this method to remove columns from preexisting PSQL tables. This method does not alter data or DDF files, and can only be used to remove all columns in memory before a table is created. See the example for AddTable method as a reference.