D.1. Create DataSource and Data Consumer Classes

A data source class is a VB class module that exposes an interface that can be used by the new BindingCollection object to bind data from a property of the class to a property of a form control. A Data Source Class can use any form of external data: a text file, a directory structure, or an ADO recordset are all examples of data that can be accessed via a VB data source class. A number of new properties have been added to VB class modules, one of which is the DataSourceBehavior property, which is set to vbDataSource to enable the class to be used as a data source.

A data consumer class is a VB class module that is bound to a form control that acts as a data source using the BindingCollection object. Another of the new properties that has been added to VB class modules is the DataBindingBehavior property, which is set to either vbSimpleBound or vbComplexBound to enable the class to be used as a data consumer.

For information on data source and data consumer classes, see Reference entry "Data Binding Objects (VB6)" in Chapter 7.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.170.14