We help IT Professionals succeed at work.
Get Started

why clear_list not clear the  list in oracle form

ash s
ash s asked
on
1,119 Views
Last Modified: 2017-11-06
here is my sample code.....please check what is wrong in this code why clear_list not clear the list before updating the list for second selection from drop-down....

DECLARE

   CURSOR CUR_FURNACE_CAT_TYPE(F_TYPE IN CHAR) IS
   
   SELECT FURNACE_TYPE,CAT_TYPE_DESC,CAT_TYPE_ID
   from PRC_FURNACE_CAT_TYPE
   WHERE FURNACE_TYPE=F_TYPE
   order by  CAT_TYPE_ID;
   
   V_CNT NUMBER := 1;

BEGIN
    CLEAR_LIST('PRC_HT_FURNACE.CATEGORY');

       IF :PRC_HT_FURNACE.FURNACE_TYPE='04' THEN  
     
              FOR LP IN CUR_FURNACE_CAT_TYPE('04') LOOP    
                    
                                  ADD_LIST_ELEMENT('PRC_HT_FURNACE.CATEGORY', V_CNT, LP.CAT_TYPE_DESC,LP.CAT_TYPE_ID);
                                  V_CNT := V_CNT + 1;
                                 
              END LOOP;
     
       ELSIF :PRC_HT_FURNACE.FURNACE_TYPE='05'  THEN  
                                               
              FOR LP IN CUR_FURNACE_CAT_TYPE('05') LOOP          
                    
                                  ADD_LIST_ELEMENT('PRC_HT_FURNACE.CATEGORY', V_CNT, LP.CAT_TYPE_DESC,LP.CAT_TYPE_ID);
                                  V_CNT := V_CNT + 1;
                                  
              END LOOP;
           
        ELSIF :PRC_HT_FURNACE.FURNACE_TYPE='06'  THEN  
                                               
              FOR LP IN CUR_FURNACE_CAT_TYPE('06') LOOP
                    
                                  ADD_LIST_ELEMENT('PRC_HT_FURNACE.CATEGORY', V_CNT, LP.CAT_TYPE_DESC,LP.CAT_TYPE_ID);
                                  V_CNT := V_CNT + 1;
                                  
          END LOOP;                                    
        END IF;

 END;
Comment
Watch Question
programmer-analyst
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 2 Answers and 21 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE