ComponentOne True DataControl 8.0
SourceRecordset Property

 

SourceRecordset Property

Sets/returns the ADO recordset used as underlying data in data source mode.

Syntax

TData.SourceRecordset

Remarks

Read/Write at run time. Not available at design time. Property applies to TData control.

The SourceRecordset property can be used only in data source mode (DataMode = 0 – DataSource). It sets/returns the ADO recordset, source of underlying data.

It is important to distinguish between SourceRecordset and Recordset properties:

·      Recordset is the actual data exposed by the TData control to its clients, whereas SourceRecordset is the data source, database where TData control gets and stores its data.

·      Recordset exists in all three data mode. SourceRecordset only has sense for DataMode = 0 – DataSource.

·      Recordset can contain more fields than SourceRecordset. Calculated fields are not part of SourceRecordset.

·      If you need to operate on the TData control’s data, or set/retrieve the current row bookmark, you must use the Recordset property, not SourceRecordset.

SourceRecordset is created by True DataControl automatically if all data source properties are specified correctly. Alternatively, SourceRecordset can be set to an ADO recordset in the OpenData event.

Setting SourceRecordset in code outside TData events refreshes the TData control. It is not allowed to set SourceRecordset in TData events other than OpenData.

See Data Source Mode for details.

See Also

TData Control

 

 


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

Product Support Forum  |  Documentation Feedback