当前位置:360首页 > 工作教育 >

怎样获的数据库中的父节点

已连接好数据库,点击树型上的节点即可提示父节点编号(已可以实现)但是节点的父节点名称怎样从数据库中调出并显示占窗体?.Open .MoveFirstDo While (Not .EOF And Not .BOF)If cn.Fields("depth") = 0 Then Label2.Caption = .Fields("Class_Name") Label4.Caption = .Fields("id") Label6.Caption = .Fields("class_name") Label8.Caption = .Fields("pid") Else Label2.Caption = .Fields("class_name") Label4.Caption = .Fields("id") Label8.Caption = .Fields("pid") Label6.Caption = .Fields("class_name")'这句不能实现节点的父节点名称???不知怎样加些条件语句?请指教!!!