您现在的位置: 万盛学电脑网 >> 程序编程 >> 网络编程 >> asp编程 >> 正文

asp access数据库连接代码

作者:佚名    责任编辑:admin    更新时间:2022-06-22

        access数据库教程连接代码

        dim conn,connstr,timesdb,rs
        timesdb="../www.111cn.net/#tsm_admin_data.asp"
        connstr="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath(""&timesdb&"")
        'on error resume next
         set conn = server.createobject("adodb.connection")
         conn.open connstr
         if err then
          err.clear
          set conn = nothing
          response.write "<center>数据库连接错误,请检查conn.asp文件连接字符串!</center>"
          response.end
         end if

        set rs=server.createobject("adodb.recordset")