This Microsoft Visual Basic USING DATABASES exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl ASP.NET 2.0 USING VB course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
A full answer to this exercise is provided as part of the training course!
| 1) | Create a new database using SQL Server Express (or Access, if you prefer). |
| 2) | Create a table called tblStatus, with fields StatusId and StatusName. Enter the following statuses/stati:
|
| 3) | Create another table called tblPerson, with fields PersonId, PersonName and StatusId. Enter the following people in this table:
|
| 4) | Create a simple form with an OK button to allow a user to choose a status: |
Use the AppendDataBoundItems property to append database items to your dropdownlist
|
|
| 5) | Add another form field containing another dropdownlist so that your user can choose people for the status you have chosen: |
The second dropdownlist uses a WHERE clause to display those people whose status id equals that chosen in the first dropdownlist
|
|
| 6) | Save and close down any files that you have open. |
Thank you for showing an interest in this ASP.NET 2.0 using VB training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.
Recommended sites: C# corner | Computer tutorials | Training classes