1 Reply Latest reply: Jan 8, 2013 8:10 AM by Marwim RSS

    identifier "parent_node" must be declared

    salute-Salem
      db and dev 10g rel2,
      i am trying to build a tree with this code , but that error appears , and i do not know why ,

      my code is :
       declare
             cursor dept_cur is
              select deptno , dname
              from   dept;
       
              cursor emp_cur is 
              select ename ,empno from emp ; 
              deptnos number ; 
              dnames varchar2(90) ; 
              enames varchar2(90) ; 
              empnos varchar2(90) ; 
              
      
        new_node varchar2(200);
        child_node varchar2(90) ; 
        
      begin
           open dept_cur ; 
       
            loop
                fetch dept_cur into deptnos ,dnames ;
                exit when dept_cur%notfound ; 
      new_node:=Ftree.Add_Tree_Node('b.tree4',
      Ftree.ROOT_NODE,
      Ftree.PARENT_OFFSET,
      Ftree.LAST_CHILD,
      Ftree.EXPANDED_NODE,
      dnames,
      null,
      deptnos);
      
      
           open emp_cur ;
      
               
                    fetch emp_cur into enames,empnos ;
      child_node:=Ftree.Add_Tree_Node('b.tree4',
      PARENT_NODE,
      Ftree.PARENT_OFFSET,
      Ftree.LAST_CHILD,
      Ftree.EXPANDED_NODE,
      enames,
      null,
      empnos);
      
      end loop ;
      end ;