December 2002
Beginner to intermediate
432 pages
10h 10m
English
The first thing to do is add the data components to form. Add an SqlConnection, an SqlDataAdapter, and a DataSet. Cancel out of the wizard for the SqlDataAdapter. When the DataSet configuration wizard appears, select untyped DataSet and click OK. Name the SqlConnection mConnection, the SqlDataAdapter mAdapter, and the DataSet mDataset. Close the Designer window and open the Code window.
Now it’s time to start writing code. The first bit of functionality to add is the ability to connect to a database. We will use our Connection object for this. First create a property to expose the Connection object to the world. This will have an interesting effect we will look at later on:
Public Property Connection() ...
Read now
Unlock full access