国产探花免费观看_亚洲丰满少妇自慰呻吟_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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 武定县| 科尔| 东丽区| 阜康市| 任丘市| 山西省| 巴中市| 莫力| 兴业县| 金昌市| 蒙城县| 贵德县| 安图县| 华安县| 措美县| 北川| 南通市| 莱芜市| 治多县| 大安市| 邯郸市| 长兴县| 额济纳旗| 青河县| 抚远县| 图木舒克市| 防城港市| 武城县| 永泰县| 陆川县| 民乐县| 大同市| 伊宁市| 清水县| 金昌市| 滨州市| 平谷区| 儋州市| 类乌齐县| 广丰县| 安顺市|