ProviderString

Description

A string containing provider-specific extended connection information. Use of this database parameter requires that you know how this string will be interpreted and used by the provider. You should use this parameter only for provider-specific connection information that cannot be explicitly described by other database parameters.

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

Applies to

Syntax

ProviderString='value'

Default

None

Usage

OLE DB applications can initialize data source objects using two methods: IDBInitialize::Initialize and IDataInitialize::GetDataSource.

Using IDBInitialize::Initialize, a provider string can be used to initialize connection properties by setting the DBPROP_INIT_PROVIDERSTRING property in the DBPROPSET_DBINIT property set. An initialization string can also be passed to the IDataInitialize::GetDataSource method to initialize connection properties.

For the OLE DB interface, the ProviderString parameter is used with IDBInitialize::Initialize. For the SNC interface, the ProviderString parameter is used with IDataInitialize::GetDataSource.

Both methods initialize the same OLE DB connection properties, but they use different sets of keywords. For lists of keywords, see the information about OLE DB provider connection string keywords in the Microsoft documentation.

Examples

Example 1

Since Microsoft SQL Server supports multiple instances of a database on a single server, you must identify the specific database to which you want to connect by entering the database name. For the ADO.NET and SNC interfaces, you should set the Database parameter on the Connection page in the Database Profile Setup dialog box. For OLE DB, you can use the ProviderString parameter.

To identify a specific Microsoft SQL Server database named ts3:

See also

URL