最新下载
热门教程
- 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
%>
相关文章
- 恶意不息圣城怎么购房 04-26
- 恋与制作人偷心计划复刻怎么玩 04-26
- 逆水寒手游五子棋残局三十一怎么过 04-26
- 金铲铲之战S11天降凯隐阵容怎么搭配 04-26
- 原神白之契约者成就怎么达成 04-26
- 原神若你渴盼鲜血成就怎么达成 04-26