主题:今天对ASP程序的感言,让我自信不在
以前多少懂点ASP的代码,现在搞SQL数据库的,感觉什么也不会,今天看别人的程序,一点也看不懂,比如下面这段代码,真是什么也不明白,虽然说遇到点问题,不能放弃,但现在感觉不知到怎么学这些东西,真是越学越不会,越往深里钻,越能体现自己的真正水平,有经验的高手谈谈这种情况我应该怎么对待:
Sub Announcements() Rem 公告显示
Dvbbs.Name="Dv_news_"&Dvbbs.boardid
If(Dvbbs.ObjIsEmpty()) Then
Set Rs=Dvbbs.Execute("Select id,boardid,title,addtime,bgs From Dv_bbsnews where Boardid="&Dvbbs.boardid&" order by id desc")
Set XmlDom = Dvbbs.RecordsetToxml(rs,"announcements","")
Dvbbs.Name = "Dv_news_"&Dvbbs.boardid
Dvbbs.Value = XmlDom.xml
Set Rs=Nothing
Else
'Set XmlDom = Dvbbs.CreateXmlDoc("Msxml2.FreeThreadedDOMDocument"& MsxmlVersion)
If Not XmlDom.LoadXml(Dvbbs.Value) Then
Set Rs=Dvbbs.Execute("Select id,boardid,title,addtime,bgs From Dv_bbsnews where Boardid="&Dvbbs.boardid&" order by id desc")
Set XmlDom = Dvbbs.RecordsetToxml(rs,"announcements","")
Set Rs=Nothing
End If
End If
'Response.Write Server.HtmlEncode(XmlDom.xml)
End Sub
Sub ShowBbsBoard() Rem 查询版面列表数据
If IsNull(Application(Dvbbs.CacheName&"_boardlist_xml")) Then Dvbbs.LoadBoardList
BoardList = Application(Dvbbs.CacheName&"_boardlist_xml")
If XmlDom.LoadXml(BoardList) Then
If Dvbbs.BoardID=0 Then
Xpath="board[@depth=0]"
Else
Xpath="board[@boardid="& Dvbbs.Boardid&"]"
End If
If Not (XMLDOM.documentElement.firstchild is nothing) Then
If Not IsObject(Application(Dvbbs.CacheName &"_information_" & XMLDOM.documentElement.firstchild.getAttribute("boardid")) ) Then
Dvbbs.LoadAllBoardinformation()
End If
End If
End If
End Sub
Sub Announcements() Rem 公告显示
Dvbbs.Name="Dv_news_"&Dvbbs.boardid
If(Dvbbs.ObjIsEmpty()) Then
Set Rs=Dvbbs.Execute("Select id,boardid,title,addtime,bgs From Dv_bbsnews where Boardid="&Dvbbs.boardid&" order by id desc")
Set XmlDom = Dvbbs.RecordsetToxml(rs,"announcements","")
Dvbbs.Name = "Dv_news_"&Dvbbs.boardid
Dvbbs.Value = XmlDom.xml
Set Rs=Nothing
Else
'Set XmlDom = Dvbbs.CreateXmlDoc("Msxml2.FreeThreadedDOMDocument"& MsxmlVersion)
If Not XmlDom.LoadXml(Dvbbs.Value) Then
Set Rs=Dvbbs.Execute("Select id,boardid,title,addtime,bgs From Dv_bbsnews where Boardid="&Dvbbs.boardid&" order by id desc")
Set XmlDom = Dvbbs.RecordsetToxml(rs,"announcements","")
Set Rs=Nothing
End If
End If
'Response.Write Server.HtmlEncode(XmlDom.xml)
End Sub
Sub ShowBbsBoard() Rem 查询版面列表数据
If IsNull(Application(Dvbbs.CacheName&"_boardlist_xml")) Then Dvbbs.LoadBoardList
BoardList = Application(Dvbbs.CacheName&"_boardlist_xml")
If XmlDom.LoadXml(BoardList) Then
If Dvbbs.BoardID=0 Then
Xpath="board[@depth=0]"
Else
Xpath="board[@boardid="& Dvbbs.Boardid&"]"
End If
If Not (XMLDOM.documentElement.firstchild is nothing) Then
If Not IsObject(Application(Dvbbs.CacheName &"_information_" & XMLDOM.documentElement.firstchild.getAttribute("boardid")) ) Then
Dvbbs.LoadAllBoardinformation()
End If
End If
End If
End Sub