0 Replies Latest reply on Jun 20, 2017 6:42 AM by Amit_Apex

    BULK ROW SELECTION & UPDATE is giving error if selecting 250+ records due to Data Type/size




      I wrote a logic for Bulk Update via "CheckBox" as Column Header in one of my report which would have 5000+ records for daily run...


      Functionality is when user will click on Column Header - Checkbox, it would select all the check boxes available in each Row  [column Code - apex_item.checkbox2(1,ROW_ID)AS checked]  via below Code.


      This code is working absolutely fine for 250-300 record selection and perform desired Update Function however when we select 500/1000 records for display and use Bulk Selection , although Bulk selection works fine but Update is failing and throwing error  "ORA-06502: PL/SQL: numeric or value error: character string buffer too small"


      Please note that even if I have used CLOB data type assuming it should allow maximum row selection and update, however no luck.


      I want to allow user to select as many as possible records available in screen rather than limited records to justify the bulk update functionality , do we have any workaround?




         l_selected_values CLOB;



      for i in 1 .. apex_application.g_f01.count loop --g_f01 is related to 

          l_selected_values := apex_application.g_f01(i) || '|' || l_selected_values;

      end loop;

          --trim the last comma

          if l_selected_values is not null then

              l_selected_values := substr(l_selected_values,1,length(l_selected_values) - 1 );

              end if;


          :P41_SELECTEDRECORDS := l_selected_values; --just assign it




      Please advise.