We will set up an ODBC connection to the SQL Server PUBS database, called PUBS. This is done through the ODBC Data Source Administrator, a program which is either launched from Control Panel or from Administrative Tools, depending on your Windows version. We will define the connection using the SQL Server driver.

From the User Data Source tab, click Add. You will be prompted to add a data source. Scroll down to SQL Server and highlight it. The display will be similar to the one shown below:

Click Finish. You will then be prompted to enter the details for the SQL Server DSN configuration. Enter the following:

  • Name: Pubs

  • Description: Example PUBS Database

  • Server: (the name of your SQL Server instance)

  Enter the information as shown below:

.

Click Next>. You will be prompted for connection information, including authentication. This varies from one installation to another. In the configuration below, SQL Server authentication is used, with the System Administrator logon sa. This is the most generous authentication, allowing the user full access rights, and may not apply to you. Consult with your database administrator for the authentication parameters.

The next window allows you to change the default database. Change it to pubs and then click OK. The window should display similar to the one below:

Accept the defaults for the next windows by clicking the OK button, until the connection is completed.

It's a good idea to test the connection at this time to make sure that it can actually communicate with SQL Server.  This will eliminate the connection setup as a problem.
  • No labels