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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
48 Appendix H Using <strong>ADO</strong>.<strong>NET</strong> <strong>2.0</strong> <strong>with</strong> <strong>Microsoft</strong> <strong>Access</strong> <strong>Databases</strong><br />
b. Open the Morgan Industries Solution (Morgan Industries Solution.sln)<br />
file contained in the VbReloaded\Appendix H\Morgan Industries<br />
Solution-Ex3 folder.<br />
c. Add the FillByFulltime query to the TblEmployTableAdapter object. (You<br />
can use Figures H.28 through H.31 as a guide.)<br />
d. Associate the FillByFulltime query <strong>with</strong> a ToolStrip control. (You can use<br />
Figures H.33 through H.35 as a guide.)<br />
e. Save the solution, then start the application. Test the FillByFulltime button<br />
on the ToolStrip control. The interface should appear as shown in<br />
Figure H.36.<br />
f. Click the Exit button to end the application.<br />
g. Create another query. The query should select only the records for parttime<br />
employees. Arrange the records in order by the Rate field. Use<br />
FillByParttime as the name for the query’s Fill method, and use<br />
GetDataByParttime as the name for its GetData method.<br />
h. Associate the FillByParttime query <strong>with</strong> a ToolStrip control. Also associate<br />
the Fill query <strong>with</strong> a ToolStrip control.<br />
i. Save the solution, then start the application. Test the FillByFulltime,<br />
FillByParttime, and Fill buttons on the ToolStrip controls.<br />
j. Click the Exit button to end the application, then close the solution.<br />
4. In this exercise, you modify the application from the chapter’s<br />
Programming Example.<br />
a. Create the Cartwright Industries application shown in the chapter’s<br />
Programming Example. Save the application in the VbReloaded\<br />
Appendix H folder.<br />
b. Create a query that allows you to display the data in ascending order by<br />
the item number. Also create a query that allows you to display the data<br />
in descending order by the price.<br />
c. Associate the two queries <strong>with</strong> two ToolStrip controls.<br />
d. Save the solution, then start and test the application.<br />
e. Click the Exit button to end the application, then close the solution.<br />
5. In this exercise, you modify the application you created in the chapter’s<br />
Programming Tutorial.<br />
a. Use Windows to make a copy of the Trivia Game Solution folder, which<br />
is contained in the VbReloaded\Appendix H folder. Rename the copy<br />
Modified Trivia Game Solution.<br />
b. Open the Trivia Game Solution (Trivia Game Solution.sln) file contained<br />
in the VbReloaded\Appendix H\Modified Trivia Game Solution folder.<br />
c. Display the question number (from 1 through 9) along <strong>with</strong> the word<br />
“Question” in the interface.<br />
d. Add another button to the interface. The button should allow the user to<br />
start a new game. Allow the user to click the New Game button only<br />
after he or she has answered all nine questions.<br />
e. Save the solution, and then start and test the application.<br />
f. End the application, then close the solution.<br />
6. In this exercise, you modify the application you created in the chapter’s<br />
Programming Tutorial.<br />
a. Use Windows to make a copy of the Trivia Game Solution folder, which<br />
is contained in the VbReloaded\Appendix H folder. Rename the copy<br />
Disc Trivia Game Solution.<br />
b. Open the Trivia Game Solution (Trivia Game Solution.sln) file contained<br />
in the VbReloaded\Appendix H\Disc Trivia Game Solution folder.<br />
Appendix H C5779 39147 Page 48 07/10/06--JHR