| Bound Mode > Binding True DBList Pro Controls to a Data Source > Binding to an OLE DB data source |
To associate a True DBList control (TODL7.OCX) with an OLE DB data source, set the RowSource property of the list to the name of an available data source, then set the DataMember property to the name of a table or query exposed by the data source. At design time, these properties can only be set in the Visual Basic Properties window.
Unlike the legacy control (TDBL8.OCX), the OLE DB version of True DBList supports assignment to the RowSource property at run time. The following code sample demonstrates how to bind the list to a Data Environment command:
| Example Title |
Copy Code
|
|---|---|
With TDBList1
Set .RowSource = DataEnvironment1
.DataMember = "Command1"
End With
|
|