Exercises

  1. In the DataAccess application you wrote today, you added a button named ShowCheckedItems to TabPage1. Write the code that iterates through the CheckedListBox and return the items that are checked. To get started, look up the GetItemChecked method in the SDK. This should give you a hint about how to proceed with the code.

  2. We didn't delve too much into the Command.Parameters collection today. Being able to send parameters to a stored procedure is extremely important. To get familiar with the syntax, examine the following Visual Basic .NET code:

     With cmd.Parameters .Add("@au_id", SqlDbType.VarChar, 11).Value = TextBox1.Text .Add("@au_fname", SqlDbType.VarChar, 20).Value = TextBox2.Text .Add("@au_lname", SqlDbType.VarChar, 20).Value = TextBox3.Text ...

Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.