最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Without DSN访问ISP的数据库拼盘
时间:2022-06-30 10:13:18 编辑:袖梨 来源:一聚教程网
除非你用远程登录软件Logon ISP的服务器,否则你是没有办法通过DSN连接数据库。下面介绍几种连接方法,让你超越与你的ISP之间的空间距离,让你连接数据库变得简单:
1.SQL Server
<%
cstr = "Provider=SQLOLEDB;Server=;database=;"
cstr = cstr & "network=DBMSSOCN;uid=;pwd="
set conn = server.createobject("adodb.connection")
conn.open cstr
' 利用Network=DBMSSOCN方式连接可以避免管理命名引起的错误
%>
2.Oracle
<%
cstr = "Provider=OraOLEDB.Oracle;Server=;Data "
cstr = cst & "Source=;User ID=;Password="
set conn = server.createobject("adodb.connection")
conn.open cstr
%>
3. Access
<%
cstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
cstr = cstr & server.mappath("/")
set conn = server.createobject("adodb.connection")
conn.open cstr
%>
4.如果你安装了Jet 4.0,用这种方法连接效果更好.
<%
cstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
cstr = cstr & server.mappath("/")
set conn = server.createobject("adodb.connection")
conn.open cstr
%>
1.SQL Server
<%
cstr = "Provider=SQLOLEDB;Server=
cstr = cstr & "network=DBMSSOCN;uid=
set conn = server.createobject("adodb.connection")
conn.open cstr
' 利用Network=DBMSSOCN方式连接可以避免管理命名引起的错误
%>
2.Oracle
<%
cstr = "Provider=OraOLEDB.Oracle;Server=
cstr = cst & "Source=
set conn = server.createobject("adodb.connection")
conn.open cstr
%>
3. Access
<%
cstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
cstr = cstr & server.mappath("/
set conn = server.createobject("adodb.connection")
conn.open cstr
%>
4.如果你安装了Jet 4.0,用这种方法连接效果更好.
<%
cstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
cstr = cstr & server.mappath("/
set conn = server.createobject("adodb.connection")
conn.open cstr
%>
相关文章
- 王者荣耀侦探能力大测试攻略 王者荣耀侦探能力大测试怎么过 11-22
- 无期迷途主线前瞻兑换码是什么 11-22
- 原神欧洛伦怎么培养 11-22
- 炉石传说网易云音乐联动怎么玩 11-22
- 永劫无间手游确幸转盘怎么样 11-22
- 无期迷途主线前瞻兑换码是什么 无期迷途主线前瞻直播兑换码介绍 11-22