HUsing ADO.NET 2.0 with Microsoft Access Databases - Cengage ...
HUsing ADO.NET 2.0 with Microsoft Access Databases - Cengage ...
HUsing ADO.NET 2.0 with Microsoft Access Databases - Cengage ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Programming Tutorial 31<br />
6. Click the Test Connection button in the Add Connection dialog box. The “Test connection succeeded.”<br />
message appears in a dialog box. Click the OK button to close the dialog box.<br />
7. Click the OK button to close the Add Connection dialog box. Trivia.mdb now appears in the Choose your data<br />
connection screen. Click the Next button. The computer displays the Local database file dialog box shown in<br />
Figure H.41.<br />
FIGURE H.41<br />
Local database file dialog box<br />
Appendix H C5779 39147 Page 31 07/10/06--JHR<br />
8. Click the Yes button to add the Trivia.mdb file to the current project. The Save the Connection String to the<br />
Application Configuration File screen shown in Figure H.42 appears next. If necessary, select the check box.<br />
Verify that this check box is selected<br />
FIGURE H.42<br />
Save the Connection String to the Application Configuration<br />
File screen<br />
9. Click the Next button to display the Choose Your Database Objects screen. Click the plus box that appears<br />
before Tables, then click the plus box that appears before Game1. Notice that the database contains one table<br />
(named Game1) and six fields. You can use this screen to select the table and/or field objects to include in the<br />
dataset.<br />
10. In this application, you need to include all of the fields in the dataset. Click the empty box that appears<br />
before Game1. Doing this selects the table and field check boxes, as shown in Figure H.43.