萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> asp編程 >> asp access數據庫連接代碼

asp access數據庫連接代碼

        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")

copyright © 萬盛學電腦網 all rights reserved