简单asp连接access数据库代码

作者:简简单单 2012-03-28

// 设置数据源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

相关文章

精彩推荐