Navigation:  ThinBASIC Modules > ADODB > ADODB Module Classes > ADODB_Connection > ADODB_Connection Properties >

<ADODB_Connection>.Provider

Previous pageReturn to chapter overviewNext page

 

Description

 

Sets or returns a string value that contains the provider name for a specific Connection object.

 

Syntax

 

GET

s = <ADODB_Connection>.Provider

 

SET

<ADODB_Connection>.Provider = sProvider

 

Returns

 

String: current PROVIDER string.

 

Parameters

 

Name

Type

Optional

Meaning

sProvider

String

Yes

pROVIDER CODE

 

 

Remarks

 

This property is read/write when the connection is closed.

The provider name can also be set with the ConnectionString property of the Connection object or the ConnectionString parameter of the Open method.

 

Restrictions

 

Never set the provider for a specific Connection in more than one place.

 

See also

 

Examples

 

Uses "Console"

Uses "ADODB"

 

'---Declare a new pConnection variable and instantiate it in one line

Dim pConn As New ADODB_CONNECTION

 

'---Specify provider

pConn.Provider "Microsoft.Jet.OLEDB.4.0"

 

'---Open connection with only MSAccess DB Name

pConn.Open APP_SourcePath & "Biblio.mdb"

 

'---Print some info

PrintL pConn.Provider

PrintL pConn.ConnectionString

 

'---Close connection

pConn.Close