当前位置:编程学习 > asp >>

简单asp连接access数据库代码

// 设置数据源conn.asp

 代码如下 复制代码

Set rs = nothing
Set conobject = Server.CreateObject("ADODB.Connection")
db="example.mdb"
DBPath = Server.MapPath(db)
conobject.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&DBPath
Set rs = Server.createobject("adodb.recordset")

Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath(db)
conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&DBPath

补充:asp教程,ASP入门 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,