DataMember Property (ADO)

The name of the data member to retrieve from the object referenced by the DataSource property.

Settings and Return Values

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

Remarks

The DataMember and DataSource properties must be used in conjunction.

This property is used to create data-bound controls in the Data Environment.

The DataMember property is used to control which of the Rowsets in the DataSource will be wrapped in the Recordset object. The Recordset object must be closed before this property is set. If the name isn't recognized by the object in the DataSource, an error is generated. If the DataMember property is not set before the DataSource property, an error is generated.

See the Control Writer section of the Data Access SDK for more information.

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