ADO Provider Attribute
Definition and Usage
The Provider property can set or return a string value containing the provider name of the specific Connection object. The default is MSDASQL (Microsoft OLE DB provider for ODBC). See Provider 代码.
This property is read/write when the connection is closed.
The provider name can also be set through the ConnectionString property of the Connection object or the ConnectionString parameter of the Open method.
Note:Do not set the provider for a specific Connection at multiple places.
syntax
connobj.Provider
instance
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" response.write(conn.Provider) conn.close %>
Provider 代码
Provider 代码 | 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 |