ADO » Connection » Provider

string = connectionobject.Provider
connectionobject.Provider = string

Sets or returns the string value that is the provider name.

The Provider property is used to set or return the name of the provider for a specific Connection object. The default is MSDASQL (Microsoft OLE DB provider for ODBC).
The provider name can also be set using the ConnectString property of the Connection object and the ConnectString parameter of the Open method. You should never set the provider for a specific Connection in more than one place.
Obviously, setting an invalid provider will generate an error.

Provider Code Provider
ADSDSOObject Active Directory Services
Microsoft.Jet.OLEDB.4.0 Microsoft Jet databases
MSDAIPP.DSO.1 Microsoft Internet Publishing
MSDAORA Oracle databases
MSDAOSP Simple text files
MSDASQL Microsoft OLE DB provider for ODBC
MSDataShape Microsoft Data Shape
MSPersist Locally saved files
SQLOLEDB Microsoft SQL Server


Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Provider = "Microsoft.Jet.OLEDB.4.0"
objConnection.Open strConnect

See Also: