Adding a Data Source

ODBC applications typically connect to a database through an ODBC data source. Each ODBC data source on a client computer has a unique data source name, or DSN. An ODBC data source for the Microsoft® SQL Server™ ODBC driver includes all the information needed to connect to a server running SQL Server, plus options, such as a default database or the type of security to use.

There are three types of ODBC data sources:

There are several ways to add a data source:

Data sources that reference the SQL Server ODBC driver contain driver-specific information and options. When a data source is created with either SQLConfigDataSource or SQLWriteFileDSN, all of the driver-specific information is supplied through keyword-value pairs in a character string passed to the function. When a data source is created using the ODBC Administrator or the SQLCreateDataSource dialog box, the SQL Server DSN Creation wizard is invoked to help you perform the steps to specify the driver-specific information.

The help file for the SQL Server DSN Creation Wizard contains information on the driver-specific options defined through the wizard. These options can also be specified as keywords in SQLConfigDataSource. For more information about the driver-specific options that can be specified with SQLConfigDataSource, see SQLConfigDataSource. The same driver-specific options can also be specified as keywords in the connect string for SQLDriverConnect. For more information about the keywords and their meanings, see SQLDriverConnect.

To start the Microsoft SQL Server DSN Configuration Wizard

See Also
Network Protocols SQLPrepare
SQLConfigDataSource  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.