Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataMember Property
Collapse the table of content
Expand the table of content

Visual Basic Reference

Visual Studio 6.0

DataMember Property

See Also    Example    Applies To

Returns or sets a specified data member from among several offered by the data provider.


object.DataMember [= string]

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
string The name of a data member.


A data provider can have multiple sets of data that that a data consumer can choose to bind to. Each set of data is called a "data member," and is identified by a unique string.

For example, when using a Data Environment that contains several Command objects as a DataSource, the DataMember specifies which Command object to use.

When using a class module or a user control as a data source, program the GetDataMember to return an appropriate data member. The event's DataMember argument contains the value of the DataMember property. By querying the argument, you can determine what data member is requested, and pass back the appropriate data through the Data argument.

© 2015 Microsoft