ComponentOne True DataControl 8.0
DataSource Property

 

DataSource Property

Sets/returns the source of underlying data in DataMode = 0 – DataSource.

Syntax

Set TData.DataSource = value

Remarks

Read/Write at design time and run time.  This property defines the source of underlying data in DataMode = 0 - DataSource. it is used to bind TData control to a standard ADO/OLE DB data source, such as an ADODC control or Visual Basic DataEnvironment.

If the DataSource property is non-empty, it overrides all data source properties (available in the DataSource property page) and SourceRecordset setting.

At run time, DataSource can be set in the OpenData event or outside TData events. Setting SourceRecordset in code outside TData events refreshes the TData control. It is not allowed to set DataSource in TData events other than OpenData.

With data sources exposing multiple recordsets, you need to use the DataMember property along with DataSource, to specify which member (recordset) is used. Setting DataMember/DataSource at run time, set DataMember first, before DataSource, to ensure that the correct member is used when TData refreshes.

Setting the DataSource property is the only option in True DataControl Lite, see Binding TDataLite to a data source. For more information, see Data Access Modes and Binding TDataLite to a data source.

See Also

TData Control

 

 


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

Product Support Forum  |  Documentation Feedback