作家
登录

文章内页类

作者: 来源:www.28hudong.com 2013-03-30 08:56:41 阅读 我要评论

复制代码 代码如下:<% 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 'response.write wenzhang.content 'set wenzhang = nothing %>

  推荐阅读

  信息采集程序

好久没有更新了,这几天做的一个信息采集的程序,大家共享。 ================= 功能: IP限制 表单动态设置 多表单设置 修改表单元素 下载此文件>>>详细阅读


本文标题:文章内页类

地址:http://www.17bianji.com/kaifa2/ASP/33017.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)