|
|
![]() | |
|
|
|
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
Note that Visual Basic also supports some additional data-bound controls to work with the ADO data control specifically, and those controls are covered in the following topic. Lets see an example. In the program in Figure 24.19, weve added a number of controls that we bind to a data control, Data1. The data control, in turn, is connected to the db.mdb database we created in the beginning of the chapter. When you move through the database with the data control, the data in each bound control is updated. The code for this example is located in the dbcontrols folder on this books accompanying CD-ROM.
The ADO Data-Bound ControlsThere are three data-bound controls that are specially optimized for use with the ADO data control: DataGrid controls, DataCombo controls, and DataList controls (dont confuse these controls with the non-ADO optimized data-bound controls like the DBCombo and DBList controls). These controls are specifically designed to work with ADO data controls and wont work with standard controls like the data control. To add these controls to a program, follow these steps:
Here are the principal data properties you use with these three controls:
Lets see an example. In this case, weve added an ADO data control and the three ADO data-bound controls to a program, as shown in Figure 24.20, and connected them to the ADO data control using their various properties. Thats all it takes, and were in business. The code for this example is located in the dbcontrols2 folder on this books accompanying CD-ROM.
|
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. |