asp数据库连接方法很多的特别是asp与access数据库有几种今天我们讲到的连接access数据库 可以说是最好的方法了
先定义了Rs,Conn为全局变量,这样在其它文件调整当前文件时就可以直接使用了.
Dim Rs,Conn
Sub Db_connect()
Dpath ="dbaseMateyDBWeb_^%$#@.mdb"
Set Conn=Server.CreateObject("Adodb.connection")
Set Rs =Server.CreateObject("Adodb.Recordset")
Conn.connectionstring="Provider=Microsoft.Jet.oledb.4.0;Data source="&Server.MapPath(Dpath)
Conn.open
End sub
这里关判断rs与conn是否创建了,如果对象存在就关闭,这样可以节省系统资源.
sub closedb()
if isobject(Rs) then
if not(Rs is nothing) then
Rs.close
set Rs=nothing
end if
end if
if isobject(Conn) then
if not(Conn is nothing) then
Conn.close
set Conn=nothing
end if
end if
end sub
韩剧再婚皇后阿里云盘全集高清1080P资源链接-韩剧再婚皇后免费阿里云盘资源下载4K高清无删减版链接
poipiku网站如何打开-poipiku官网网页版访问入口
明日方舟:终末地-云游戏畅玩入口-明日方舟:终末地-网页版在线直连地址
poki在线小游戏网页版-poki免费游戏大全入口
poki游戏入口-点开即玩-poki游戏-在线免费畅玩
原神akt大佬资源viciNeko入口链接-原神akt大佬资源网页vicineko入口链接分享