Visual Studio has many built-in tools that make working with data as simple as drag-and-drop. Well, it's not really that quick. But by answering a few questions and dragging and dropping one item, you can build an entire application that lets you edit data in your database. Let's try it together.
Start up a new Windows Forms project in Visual Studio—just a plain Windows Forms project, not one of the Library-specific projects. Selecting the Data → Show Data Sources menu command brings up the Data Sources panel, as shown in Figure 10-2.
Figure 10-2. Where are the data sources?
New projects don't include any data sources by default, so we need to add one. Click on the Add New Data Source link in the Data Sources panel. The Data Source Configuration Wizard guides you through the data source creation process:
The first step asks, "Where will the application get data from?" Select Database and click the Next button.
The second step asks, "Which data connection should your application use to connect to the database?" We'll have to create a new connection for the Library database we designed way back in Chapter 4. Click the New Connection button.
The Choose Data Source dialog appears. Select Microsoft SQL Server from the "Data source" list, and then click the Continue button. If you have accessed this dialog before and checked the ...