Name

Connection.Provider Property — (Versions 2.0, 2.1, 2.5, 2.6)

Synopsis

                     connection.Provider = provider
                  

The Provider property indicates the name of the data provider for the current Connection object.

Datatype

String

Description

The Provider property sets the provider for the current Connection object. It can also be specified in the ConnectionString property of the Connection object or the ConnectionString argument to the Open method of the Connection object. It is recommended that the provider be specified in only one of these places, however, because the results can be unpredictable.

The Provider property of the Connection object is read- and write-enabled when the associated Connection object is closed, but read-only once it is open.

The Provider property is not used until the Connection object is opened or the Properties collection of the Connection object is used.

If no provider is specified, ADO will default to MSDASQL, the Microsoft ODBC Provider for OLE DB.

See Also

Connection.ConnectionString Property, Connection.Open Method

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.