国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

文章內頁類

2024-05-04 11:02:43
字體:
來源:轉載
供稿:網友
復制代碼 代碼如下:
<%
class MyArticle
    dim wenzhang_id
    dim title1,content1
    Private Sub Class_Initialize()
        'response.Write "類的初始化 事件:Class_Initialize<br>"
    end sub

    Private Sub Class_Terminate() 
        'response.Write "釋放對象 事件:Class_Terminate<br>" 
    end sub

    Public Property Let id(byval v) 
        wenzhang_id = v 
    End Property 

    Public Sub conn_sub() 
        Set conn = Server.createObject("ADODB.Connection")
          cnnstr="DRIVER={Microsoft Access Driver (*.mdb)}; "
          cnnstr=cnnstr & "DBQ=" & Server.MapPath("admin/WataVase/%29to-dream.mdb")
          conn.Open cnnstr

        sql = "Select * From Article where Deleted = 0 and ArticleID = "&wenzhang_id
          set rs=Server.CreateObject("adodb.recordset") 
          rs.open sql, conn, 1, 1

        title1 = rs("Title")
        content1 = rs("Content")

        rs.close
        set rs = nothing

        conn.close
        set conn = nothing

    end sub 

    Public Property Get title() 
        title = title1
    End Property

    Public Property Get content() 
        content = content1
    End Property

end class

'MyArticle 類 使用說明
'dim wenzhang
'set wenzhang = new MyArticle
'wenzhang.id = 3
'call wenzhang.conn_sub()
'response.write wenzhang.title
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 岳普湖县| 丁青县| 沙洋县| 古蔺县| 江西省| 忻州市| 柯坪县| 博白县| 方山县| 林周县| 长沙市| 吴川市| 三原县| 邢台市| 邢台县| 定日县| 邢台县| 新泰市| 镇远县| 剑川县| 泰和县| 安远县| 巍山| 鄂温| 衡阳县| 凤翔县| 莱芜市| 南昌县| 蛟河市| 珲春市| 三亚市| 连平县| 平远县| 黄浦区| 句容市| 新竹县| 启东市| 蛟河市| 乌海市| 顺义区| 安吉县|