<%
class&nbs
p;MyArticle
dim wenzhang_id
dim t
ITle1,content1
PRivate S
ub Class_Initialize()
'response.Write "类的初始化 事件:Class_Initialize<
br>"
end sub
Private Sub Class_Terminate()
'response.Write "释放对象 事件:Class_Terminate<br>"
end sub
Public Pro
PErty 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 &
amp; "DBQ=" & Server.MapPath("admin/WataVase/%29to-dream.mdb")
conn.Open cnnstr
SQL = "Select *
From Article where Deleted = 0 and Articl
eiD = "&wenzhang_id
set rs=Server.CreateObject("adodb.reco
rdset")
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
%>