久久综合丝袜日本网手机版,日韩欧美中文字幕在线三区,亚洲精品国产品国语在线,极品在线观看视频婷婷

      <small id="aebxz"><menu id="aebxz"></menu></small>
    1. asp 數(shù)據(jù)庫連接函數(shù)代碼介紹

      時(shí)間:2022-06-26 06:10:25 數(shù)據(jù)庫操作系統(tǒng) 我要投稿
      • 相關(guān)推薦

      asp 數(shù)據(jù)庫連接函數(shù)代碼介紹

        以下是SQL連接代碼:

        復(fù)制代碼 代碼如下:

        Function Open_conn()

        dim Conn,Strconn

        set Conn=server.createobject("adodb.connection")

        Strconn = "Provider = Sqloledb; User ID = 數(shù)據(jù)庫登錄帳號; Password = 數(shù)據(jù)庫登錄密碼; Initial Catalog = 數(shù)據(jù)庫名稱; Data Source = (local);"

        Conn.open Strconn

        set Open_conn=Conn

        If Err Then

        err.Clear

        Conn.close:set Conn=nothing

        Response.Write "對不起,數(shù)據(jù)庫連接出錯(cuò)。"

        Response.End

        End If

        End Function

        調(diào)用方法:

        將原來的

        復(fù)制代碼 代碼如下:

        rs.open sql,conn

        改成

        復(fù)制代碼 代碼如下:

        rs.open sql,Open_conn()

        以下是ACCESS連接代碼:

        復(fù)制代碼 代碼如下:

        Function Open_conn()

        dim Dbpath,Conn

        Dbpath=server.MapPath("數(shù)據(jù)庫路徑")

        set Conn=server.createObject("ADODB.connection")

        Conn.open "data source="&dbpath&";provider=microsoft.Jet.OLEDB.4.0;"

        set Open_conn=Conn

        If Err Then

        err.Clear

        Conn.close:set Conn=nothing

        Response.Write "對不起,數(shù)據(jù)庫連接出錯(cuò)。"

        Response.End

        End If

        End Function

        調(diào)用方法:

        將原來的

        復(fù)制代碼 代碼如下:

        rs.open sql,conn

        改成

        復(fù)制代碼 代碼如下:

        rs.open sql,Open_conn()

      【asp 數(shù)據(jù)庫連接函數(shù)代碼介紹】相關(guān)文章:

      用php連接oracle數(shù)據(jù)庫的代碼06-28

      使用Java程序連接各種數(shù)據(jù)庫的方法07-01

      計(jì)算機(jī)三級數(shù)據(jù)庫知識:數(shù)據(jù)庫在連接中常見錯(cuò)誤解決方法06-28

      excel 函數(shù)如何編輯函數(shù)07-03

      Android短信數(shù)據(jù)庫基礎(chǔ)詳細(xì)介紹06-28

      計(jì)算機(jī)網(wǎng)絡(luò),我對數(shù)據(jù)庫,ASP.NET比較感興趣,分析一下數(shù)據(jù)庫專業(yè)的就業(yè)前景?07-14

      電腦網(wǎng)絡(luò)連接禁用連接出錯(cuò)的做法08-07

      電路的連接方法07-03

      ASP面試試題及答案07-13

      數(shù)據(jù)庫管理員工作職責(zé)詳細(xì)介紹06-28