1 Function getTreeRootId(pNodeId)
2 getSQL = "select note_id,parent_id from [T_tree_demo] where note_id='"& pNodeId &"'"
3 Set getRs = db.Execute(getSQL)
4 If Not getRs.eof Then
5 If Trim(getRs("parent_id")) = "0" Then
6 getTreeRootId = Trim(getRs("note_id"))
7 Exit Function
8 Else
9 getTreeRootId = getTreeRootId(Trim(getRs("parent_id")))
10 End If
11 Else
12 getTreeRootId = 0
13 Exit Function
14 End If
15 getRs.close
16 Set getRs = Nothing
17  End Function
18  

 

相关文章:

  • 2021-07-25
  • 2022-12-23
  • 2022-03-01
  • 2021-12-19
  • 2021-12-19
  • 2021-08-10
猜你喜欢
  • 2021-12-19
  • 2021-12-19
  • 2021-07-07
  • 2022-12-23
  • 2021-11-30
  • 2021-12-29
相关资源
相似解决方案