Object Model > True DataControl Objects and Collections |
True DataControl provides a rich set of properties, methods, and events that enable you to develop sophisticated database applications with much less manual coding than using conventional data source controls. The organization imposed by True DataControl object model makes it easier to work with its large feature set.
Objects and collections that refer to True DataControl entities, such as fields, can be customized at design time or run time. Objects and collections that refer to abstract entities, such as arrays and bookmarks, are only available in code at run time.
When you add a True DataControl file to a Visual Basic project, the True DataControl (TData) is added to the Toolbox:
TData |
ComponentOne True DataControl |
In the Lite version, it will be
TDataLite |
ComponentOne True DataControl Lite |
The type library for True DataControl 8.0 (its short name is TrueData60Ctl, or TrueDataLite70Ctl for the Lite version 8.0) also contains definitions for the following objects:
NamedBookmark |
Represents a bookmark appearing in the list in the Bookmarks dialog. |
Constraint |
Represent a field-level or record-level constraint. |
Field |
Represents a True DataControl field. |
FilterExpression |
Represents a filter expression. |
Parameter |
Represents a True DataControl parameter. |
PropertyExpression |
Represents a control property expression. |
RangeCondition |
Represents a field’s range condition (unavailable in the Lite version). |
RowBuffer |
Transfers data to and from user mode events (unavailable in the Lite version). |
A collection is an object used to group similar objects. Since a collection itself is an object, you can manipulate it in code just as you would any other object. The type library for True DataControl 8.0 contains definitions for the following collections:
NamedBookmarks |
Contains zero or more NamedBookmark objects. |
Constraints |
Contains zero or more Constraint objects. |
Fields |
Contains zero or more Field objects. |
FilterExpressions |
Contains zero or more FilterExpression objects. |
Parameters |
Contains zero or more Parameter objects. |
PropertyExpressions |
Contains zero or more PropertyExpression objects. |
RangeConditions |
Contains zero or more RangeCondition objects. |
When using True DataControl memory array mode (DataMode = 1 – MemoryArray), you also need to add a reference to the ComponentOne XArrayDB Object to your project. This is not a control, but a reference that defines a single object:
XArrayDB |
Variant array used as a data source in storage mode. |
The following sections provide a brief overview of True DataControl objects and collections.