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

首頁(yè) > 編程 > ASP > 正文

文章內(nèi)頁(yè)類

2024-05-04 10:59:03
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
復(fù)制代碼 代碼如下:

<%
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 "釋放對(duì)象 事件: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 類 使用說(shuō)明
'dim wenzhang
'set wenzhang = new MyArticle
'wenzhang.id = 3
'call wenzhang.conn_sub()
'response.write wenzhang.title
'response.write wenzhang.content
'set wenzhang = nothing
%>
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 灵山县| 定日县| 平遥县| 莎车县| 华池县| 台南市| 诏安县| 内丘县| 仙游县| 赣榆县| 三门峡市| 双城市| 锡林郭勒盟| 江陵县| 盘锦市| 新河县| 微山县| 呼伦贝尔市| 阿拉善右旗| 西乌| 永寿县| 常德市| 靖安县| 曲周县| 丹江口市| 关岭| 乐清市| 淳安县| 维西| 乐至县| 本溪| 色达县| 安义县| 和田市| 尼玛县| 南陵县| 明星| 临城县| 白银市| 宝山区| 宜宾县|