ASP 遞歸調(diào)用 已知節(jié)點(diǎn)查找根節(jié)點(diǎn)的函數(shù)
更新時間:2009年12月08日 00:31:14 作者:
已知節(jié)點(diǎn)查找根節(jié)點(diǎn)的asp函數(shù)
復(fù)制代碼 代碼如下:
Function getTreeRootId(pNodeId)
getSQL = "select note_id,parent_id from [T_tree_demo] where note_id='"& pNodeId &"'"
Set getRs = db.Execute(getSQL)
If Not getRs.eof Then
If Trim(getRs("parent_id")) = "0" Then
getTreeRootId = Trim(getRs("note_id"))
Exit Function
Else
getTreeRootId = getTreeRootId(Trim(getRs("parent_id")))
End If
Else
getTreeRootId = 0
Exit Function
End If
getRs.close
Set getRs = Nothing
End Function
相關(guān)文章
asp Response.flush 實(shí)時顯示進(jìn)度
如果你知道Response.Flush和Response.Clear,那你就可以不用這樣的等待了。每生成一個Html頁面,就用Response.write立即返回一條信息,提示該條數(shù)據(jù)庫記錄已經(jīng)生成Html。2008-08-08ajax XMLHTTP Post Form時的表單亂碼綜合解決
用XMLHTTP Post Form時的表單亂碼有兩方面的原因——Post表單數(shù)據(jù)時中文亂碼;服務(wù)器Response被XMLHTTP不正確編碼引起的亂碼。換句話說,本文主要解決兩個問題——怎樣正確Post中文內(nèi)容&怎樣正確顯示得到的中文內(nèi)容。2008-05-05通過asp程序來創(chuàng)建access數(shù)據(jù)庫
access數(shù)據(jù)庫屬于“文件型數(shù)據(jù)庫”,創(chuàng)建時需要指定它要使用的文件2009-06-06用Asp隱藏文件路徑,實(shí)現(xiàn)防盜鏈 的代碼
用Asp隱藏文件路徑,實(shí)現(xiàn)防盜鏈 的代碼...2007-11-11ASP生成隨機(jī)字符串(數(shù)字+大小寫字母)的代碼
ASP生成隨機(jī)字符串(數(shù)字+大小寫字母)的代碼...2007-10-10