最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp数据库连接代码
时间:2022-06-29 13:48:45 编辑:袖梨 来源:一聚教程网
'本文章提供一款比较完美的asp数据库连接代码哦,他不但连接access数据库同时也包括了数据库断开连接代码函数。
dim conn,rs,sql,dbpath
set conn=server.createobject("adodb.connection")
dbpath="web_data.asp" '数据库路径
call conndate()
sub conndate()
if err then err.clear
on error resume next
conn.open "provider = microsoft.jet.oledb.4.0;data source = " & server.mappath(dbpath)
if err then
err.clear
set conn=nothing
response.write "
response.end
end if
end sub
sub closeconn()
on error resume next
if isobject(conn) then
conn.close
set conn = nothing
end if
if err then err.clear
end sub
%>
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17