Muokkaa

Jaa


DataMember Property

Indicates the name of the data member that will be retrieved from the Recordset referenced by the DataSource property.

Settings and Return Values

Sets or returns a String value. The name is not case sensitive.

Remarks

This property is used to create data-bound controls with the Data Environment. The Data Environment maintains collections of data (data sources) containing named objects (data members) that will be represented as a Recordset object.

The DataMember and DataSource properties must be used together.

The DataMember property determines which object specified by the DataSource property will be represented as a Recordset object. The Recordset object must be closed before this property is set. An error is generated if the DataMember property is not set before the DataSource property, or if the DataMember name is not recognized by the object specified in the DataSource property.

Usage

Dim rs as New ADODB.Recordset  
rs.DataMember = "Command"     'Name of the rowset to bind to  
Set rs.DataSource = myDE      'Name of the object containing an IRowset  

Applies To

Recordset Object (ADO)

See Also

DataSource Property (ADO)