Using ADO control in the form: – Follow the following step to link with ADO tool.
- Design a form with other control and add ADO control on the form. By default its caption name is ADODC1 and other features are exactly same as DAO control.
- Now we will add properties of ADO data control. Select ADO control on the form and select its connection string property from property window. A property page dialog box will appear on screen. In this dialog box, three option available such as use data link file, use ODBC data source name and use connection string.
- Make sure the use connection string is selected. Click the build button. The data link properties dialog box will appear.
- In the data link property box, we select Microsoft jet 4.0 OLEDB provider option.
- Click next button in data link property dialog box and another dialog box will appear. Select database name with proper path. After selecting database, click test connection button. A confirmation message will appear then click OK button. An another dialog box will appear named with properties page. In this dialog box, select table name and mode of operation. Then click apply button. Now link is prepared. We can use this data base as well as DAO control.