国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 周至县| 依安县| 泽普县| 重庆市| 新丰县| 泰来县| 涪陵区| 景洪市| 德惠市| 延津县| 马尔康县| 宿迁市| 德格县| 大洼县| 和林格尔县| 屯门区| 东宁县| 固安县| 沛县| 扎赉特旗| 色达县| 大渡口区| 松阳县| 佛坪县| 张家港市| 阳朔县| 昌吉市| 开鲁县| 兰坪| 安溪县| 怀仁县| 綦江县| 长岭县| 太康县| 荥阳市| 永城市| 冷水江市| 兴安县| 枣阳市| 富顺县| 扶沟县|