ComponentOne True DataControl 8.0
Data Source Mode

A TData control in data source mode uses an ADO recordset as its underlying data. The recordset is accessible via the SourceRecordset property. It is important to distinguish this (source) recordset from the recordset that True DataControl exposes to its clients, the bound controls. The latter is also an ADO recordset and it is accessible via the Recordset property.

SourceRecordset is the source of underlying data. When True DataControl needs to fetch or store data, it does so using SourceRecordset, on which it operates internally. In more involved cases, to control database modification, developer can override the default action of saving changes in the database using DataWrite event.

Users don’t normally need to access SourceRecordset directly, unless they wish to synchronize (refresh) it with the current data from the database (that can changed by other users; use TData.SourceRecordset.Requery for that purpose), or change its properties or contents programmatically. For more information, see Modifying SourceRecordset from code.

The Recordset consists of the data exposed to the controls that are bound to a TData control. This is the True DataControl recordset as users see it, and it may contain more (or less) fields than the SourceRecordset. For example, calculated fields appear in Recordset, but not in SourceRecordset, because they are not part of the underlying data. Users operate on the True DataControl recordset in exactly the same way as on a standard ADO data control's (ADODC’s) recordset. For example, setting TData.Recordset.Bookmark moves a TData control to a specified record.

Note: True DataControl Lite does not have the SourceRecordset property, its role plays the standard ADO data source to which TDataLite is bound via DataSource/DataMember properties, see Binding TDataLite to a data source.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback