Certified ASP.NET Programmer Learning Resources Connecting to the database

Learning Resources
 

Connecting to the database


To verify the connection to the Northwind database

  1. Launch Visual Studio 2005.
  2. From the View menu, click Server Explorer.
  3. In Server Explorer, right-click Data Connections, and then click Add Connection...

    You can now test either Windows Authentication or SQL Server Authentication.

  4. If this is the first time you have added a connection in Visual Studio 2005 the Change Data Source window will appear. Select Microsoft SQL Server and click Continue.
    1. To test Windows Authentication, do the following:
    • Type the name of your MSDE server (typically your computer name).
    • Select the "Use Windows NT Integrated security" option.
    • Click the Select the database on the server dropdown list, and then select "Northwind."
    1. To test SQL Server Authentication, do the following:
    • Type the name of your MSDE server (typically your computer name).
    • Select the "Use a specific name and password" option.
    • Type the following user name: sa.
    • Click the Select the database on the server dropdown list, and then select "Northwind."
  5. Click Test Connection, to verify that your installation of Northwind with either Windows Authentication or SQL Server Authentication is successful.

If you have chosen to use SQL Server Authentication, for security you should not use the system administrator account. Instead, to address security concerns, create a database account with more limited access for use by your web application. In the following section you learn how to create this limited access account for addressing the Northwind database.

--MSDN
 For Support