ProviderString – PB Docs 126

ProviderString database parameter

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.

note.png When to specify ProviderString

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

Controls

  • ADO.NET

  • OLE DB

  • SNC SQL Native Client for Microsoft SQL Server

Syntax

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

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:

  • Database profile

    Enter the following in the Extended Properties box on the
    Connection page in the Database Profile Setup dialog box for OLE DB:

  • Application

    Type the following in code for an OLE DB connection:

See Also

URL


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x