节点代码 节点名称          父节点代码
11 北京市 0
1101 北京市市辖区 11
110101 北京市东城区 1101
--------------
数据库为access  可以在查询时将数据生成树形结构吗?在oracle 中可以。
是用类似下面的方法吗?
      Set db = CurrentDb
      ' 打开雇员表.
      Set rst = db.OpenRecordset("表", dbOpenDynaset, dbReadOnly)
      ' Create a reference to the TreeView Control.
      Set objTree = Me!xTree.Object
      ' 查找第一个上级
      rst.FindFirst "[parent] Is Null"
      ' 向TREEVIEW装入数据
      Do Until rst.NoMatch
         ' 取得NAME
         strText = rst![Name]
         ' TREEVIEW第一层.
         Set nodCurrent = objTree.Nodes.Add(, , "a" & rst!Id, _
            strText, 1, 3)
         ' 装记录位置存入变量.
         bk = rst.Book
         ' 用递归过程加入子节点(调用)
         AddChildren nodCurrent, rst
         ' 返回原位
         rst.Book = bk
         ' 查找下一个上级
         rst.FindNext "[parent] Is Null"
      Loop