446 Part IV Database and Web Programming
concerning themselves with the format of underlying database tables and columns.
The entity data model option is made possible by the ADO .NET Entity Framework,
which is a subset of the ADO .NET database technology.
- Click Dataset, and then click Next to select the dataset model.
The wizard now displays a screen that helps you establish a connection to your
database by building a statement called a connection string. A connection string
contains the information that Visual Studio needs to open and extract information
from a database file. This includes a path name and file name, but also potentially
sensitive data such as a user name and password. For this reason, the connection string
is treated carefully within the Data Source Connection Wizard, and you should take
care to protect it from unauthorized access as you copy your source files from place
to place.
- Click the New Connection button.
The first time that you click the New Connection button, the Choose Data Source
dialog box opens, prompting you to select the database format that you plan to use.
If you see the Add Connection dialog box instead of the Choose Data Source dialog
box, it simply means that your copy of Visual Studio has already been configured to
favor a particular database format. No problem; simply click the Change button in the
Add Connection dialog box, and you’ll see the same thing that first-time wizard users
see, except that the title bar reads Change Data Source. In this example, however, I’ll
assume that you haven’t selected a data source format; in that case, your screen looks
like the following screen shot:
The Change/Choose Data Source dialog box is the place where you select your
preferred database format, which Visual Studio uses as the default format. In this
chapter, you’ll select the Access format, but note that you can change the database
format to one of the other choices at any time. You can also establish more than one
database connection—each to a different type of database—within a single project.