最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
通过ADO连接各种数据库的字符串翠集(二)(完)
时间:2022-06-30 10:13:31 编辑:袖梨 来源:一聚教程网
(接上篇)
二 二、接下来讲使用OLE DB来连接数据库的例子。
1) OLE DB Provider for Active Directory Service
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=ADSDSOObject;" & _
"User Id=myUsername;" & _
"Password=myPassword;"
oConn.Open strConn
%>
2) OLE DB Provider for DB2
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=DB2OLEDB;" &
"Network Transport Library=TCPIP;" &
"Network Address=MyServer;" & _
"Package Collection=MyPackage;" &
"Host CCSID=1142"
"Initial Catalog=MyDB;" &
"User ID=MyUsername;" & _
"Password=MyPassword;"
oConn.Open strConn
%>
3) OLE DB Provider for Index Server
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=msidxs;" & _
"Data source=MyCatalog;"
oConn.Open strConn
%>
4) OLE DB Provider for Internet Publishing
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=MSDAIPP.DSO;" & _
"Data Source=http://mywebsite/myDir;" & _
"User Id=myUsername;" & _
"Password=myPassword;"
oConn.Open strConn
%>
5) OLE DB Provider for Microsoft Jet
● 标准的也是常用的访问方式。
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=Microsoft.Jet.OLEDB.4.0;" & _
二 二、接下来讲使用OLE DB来连接数据库的例子。
1) OLE DB Provider for Active Directory Service
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=ADSDSOObject;" & _
"User Id=myUsername;" & _
"Password=myPassword;"
oConn.Open strConn
%>
2) OLE DB Provider for DB2
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=DB2OLEDB;" &
"Network Transport Library=TCPIP;" &
"Network Address=MyServer;" & _
"Package Collection=MyPackage;" &
"Host CCSID=1142"
"Initial Catalog=MyDB;" &
"User ID=MyUsername;" & _
"Password=MyPassword;"
oConn.Open strConn
%>
3) OLE DB Provider for Index Server
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=msidxs;" & _
"Data source=MyCatalog;"
oConn.Open strConn
%>
4) OLE DB Provider for Internet Publishing
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=MSDAIPP.DSO;" & _
"Data Source=http://mywebsite/myDir;" & _
"User Id=myUsername;" & _
"Password=myPassword;"
oConn.Open strConn
%>
5) OLE DB Provider for Microsoft Jet
● 标准的也是常用的访问方式。
<%
Dim oConn,strConn
Set oConn=Server.CreateObject(“ADODB.Connection”)
StrConn= "Provider=Microsoft.Jet.OLEDB.4.0;" & _
相关文章
- 《绝区零》伊芙琳培养材料汇总 01-24
- 《无限暖暖》1.2春节兑换码一览 01-24
- 《网上国网》查询阶梯档位方法 01-24
- 《蛋仔派对》神游贺岁盲盒获取方法 01-24
- 《炉石传说》星际联动盗贼卡组玩法介绍 01-24
- 皮革珊瑚属于珊瑚中的 01-24