Skip to Main Content
Professional Visual Studio® 2008
book

Professional Visual Studio® 2008

by Nick Randolph, David Gardner
July 2008
Intermediate to advanced content levelIntermediate to advanced
1026 pages
27h 59m
English
Wrox
Content preview from Professional Visual Studio® 2008

39.1. Connection String Wizard

Connection strings are similar to XML in that, although they can be read, it is neither an enjoyable experience nor recommended to work with them directly. Because connection strings are strings, it is easy to introduce errors, misspell words, or even omit a parameter. Unlike XML, which can easily be validated against a schema, connection strings are harder to validate. The connection string wizard built into Visual Studio 2008 enables you to specify database connections without having to manually edit the connection string itself.

You can invoke the connection string wizard in a number of ways, as you will experience when you start working with any of the data controls in either the Windows Form or Web Form designers. For the purposes of illustrating the wizard, follow these steps to add a new data source to an existing Windows Forms application. You'll connect to the sample AdventureWorks database, which you will need to download from the Codeplex web site (www.codeplex.com and search for AdventureWorks).

  1. From the Data menu within Visual Studio 2008, select Add New Data Source, which opens the Data Source Configuration Wizard.

  2. Selecting Database enables you to determine the database connection to use. If a connection already exists, you can select it from the drop-down and the associated connection string will appear in the lower portion of the window, as shown in Figure 39-1.

    Figure 39.1. Figure 39-1

The connection string will connect to the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson

Publisher Resources

ISBN: 9780470229880Purchase book