Programming Assignment 8 - Fun with C# and ADO.NET

Due date: By 11:59 pm on Tuesday, 11/23/2004
Extra Credit Due date: By 11:59 pm on Tuesday, 11/30/2004

This assignment is worth 100 points. You will write a small application that uses C# and ADO.NET to query a database.

First, download and print this chapter from the Deitel and Deitel book on C#. Next, download the sample code that goes along with this chapter. Unzip it into your working directory for this assignment.

Read through the chapter and look at the provided examples. Feel free to skim if you're already familiar with SQL and/or ADO.NET.

Now complete Exercise 19.4 from the end of the chapter. The Books.mdb file they refer to is included with the sample code.

Note: To do this assignment, you will need to have Microsoft Access installed. If you don't have it on your machine at home, you should work in the Tufts lab if possible. If you can't do that, send Eddie an email and we'll work something out.

When you are finished, please submit your solution directory using the following command line on the sun.eecs.tufts.edu machine:

Extra Credit (10 points)

Add a "Map" button to the address book example from the sample code. When the user clicks this "Map" button, instantiate the MapPoint Web Service and display a map of the location of the currently displayed contact.

To do this, you first need to download and install the MapPoint SDK.

When you install the MapPoint SDK, it should install several samples. The default location for these samples is C:\Program Files\Microsoft MapPoint Web Service SDK, Version 3.5\Samples. The ClickToCenterMap example will be particularly helpful. The C# version is in the cs directory.

To get the sample code to work, you will need to modify the sample code a bit. The easiest way to do this is to go to Help > Index in Visual Studio, set Filtered by to MapPoint Web Service SDK, and then look for Click to Center Map Example. This will tell you how to modify the sample to get it to work. The proper values for MPUser and MPPass have been emailed to you via the class list. Be sure to set these correctly or the MapPoint web service will not work!

Once you get the sample code to work, you should be able to apply much of it to the address book sample. Good luck!