DataSource

Description

Identifies the data source to which you want to connect. The data source can be a file, a database, or an ODBC data source depending on the OLE DB data provider you are using.

NoteWhen to specify DataSource You must specify the DataSource parameter before connecting to the database.

Applies to

Syntax

DataSource='datasource_name'

Default

None

Usage

For the SNC interface for SQL Server 2005, specifying a value for Server on the Connection page or specifying a value for SQLCA.ServerName in code is equivalent to setting this parameter.

The value of the Data Source parameter varies depending on the type of data source connection you are making. For example, if you are using Microsoft’s OLE DB Provider for ODBC, you would enter the actual ODBC data source name for the Data Source value. If you are using Microsoft’s OLE DB Provider for SQL Server, you would enter the actual Microsoft SQL Server server name for the Data Source value.

For more information, see the documentation provided by your OLE DB data provider.

Examples

Example 1

To use the Microsoft OLE DB Provider for ODBC to connect to the EAS Demo DB:

Example 2

To use the Microsoft OLE DB Provider for Oracle to connect to an Oracle 8 database:

See also