Share via


Configuring a Connection to the Sample Database in the Server Explorer

In this tutorial, you use a GUI approach to generate your DataSet schema: in the main window of Visual Studio, you drag a database table from Server Explorer onto a DataSet window.

Your first step is to configure a database connection in the Server Explorer to the sample database that is provided with the Crystal Reports sample reports.

  1. From the View menu, click Server Explorer.

  2. In Server Explorer, right-click Data Connections, and then click Add Connection...

    The next steps are different depending on whether you are adding this connection in Visual Studio .NET 2003, or a later version of Visual Studio.

  3. In Visual Studio .NET 2003, do the following:

1.  In the Data Link Properties dialog box, click the Provider tab.
2.  In the Choose a data provider panel, click .NET Framework Data Provider for OLE DB, and then click the Connection tab.
3.  In the Select an OleDB provider box, select Microsoft Jet 4.0 OLE DB Provider.
  1. In Visual Studio 2005 or later, do the following:
1.  In the Change Data Source dialog box, in the Data Provider combo box, select .NET Framework Data Provider for OLEDB.
2.  In the DataSource list, select Microsoft Access Database File, and then click OK.


> [!NOTE]
> <P>If this is the first time you have added a connection in Visual Studio 2005 the Change Data Source window will appear. If the Add Connection dialog box appears, click Change...</P>
  1. In the Database File Name field, enter the path to the Xtreme sample database.
> [!NOTE]
> <P>You can copy and paste the path to the Xtreme sample database. To access the path for your version of Crystal Reports, see <A href="ms225530(v=vs.90).md">Location of Xtreme Sample Database</A>.</P>
  1. Set the User name and Password fields to blank, and then click Test Connection.

  2. If your test connection is not successful, recheck the path to the Xtreme sample database and ensure that both User name and Password are blank.

  3. Click OK to close the Test Connection dialog box, and click OK again to close the Connection Properties dialog box.

  4. In Server Explorer, expand the Access node, and then the Tables node.

  5. Verify that the Customer table is visible in the Server Explorer.