Page 256 - Open Soource Technologies 304.indd
P. 256
Event Driven Programming
3. Change the control’s Name and Caption from their default values. (The Caption is for
information only, so you can set it to whatever you think will be most informative for
the user.)
4. Set the ConnectionString property using steps 5–9.
5. Click the ellipsis next to the ConnectionString property in the ADO Data Control’s
Properties window to bring up the Property Page dialog box for this property, as shown
in Figure 11.4.
Figure 11.4: The first and only Property Page dialog box for the ADO Data
Control’s ConnectionString Property.
6. As Source of Connection, choose one of the following three options:
• Use Data Link File. If you choose this option, you will be able to click the Browse
button to specify an existing *.UDL file).
• Use ODBC Data Source Name. If you choose this option, you will be able to choose
an existing ODBC DSN from the drop-down list, or you can create a new DSN by
clicking the New button.
• Use Connection String. If you choose this option, you will be able to click the Build
button to bring up the Data Link Properties tabbed dialog box.
The following steps assume that you have chosen this option.
7. On the Provider tab of the Data Link Properties tabbed dialog box, choose an OLE DB data
provider, such as Microsoft Jet 3.51 OLE DB (see Figure 11.5).
250 LOVELY PROFESSIONAL UNIVERSITY