0 Replies Latest reply on Jul 3, 2014 7:51 AM by Saeed Hassanpour

    Export pages manually in Apex

    Saeed Hassanpour

      Dear

      I want to export page of application in sql plus with below code. But I got error

      -----------------------------------------------------------------------------

      Appication = 104

      Page = 10

       

      Declare
        i number;
        v_out_buf htp.htbuf_arr;
        v_out_row_count number:=99999999;
        v_document_blob blob;
        params owa.vc_arr;
      begin
        owa.init_cgi_env (params);
        apex_040200.wwv_flow_gen_api2.export (104, 10);

       

         owa.get_page (v_out_buf, v_out_row_count);

        dbms_lob.createtemporary (v_document_blob, true, dbms_lob.session);
        for i in  1 .. v_out_row_count loop    
          dbms_lob.writeappend (v_document_blob, utl_raw. length (utl_raw.cast_to_raw (v_out_buf (i))), utl_raw.cast_to_raw (v_out_buf (i)));
         end  loop ;

       

        insert  into TEST_BLOB (F1)
         values (v_document_blob);
        commit;
        dbms_lob.freetemporary (v_document_blob);

      end ;

      ORA-06502: PL/SQL: numeric or value error: character string buffer too small

      ORA-06512: at "SYS.HTP", line 1557

      ORA-06512: at "APEX_040200.WWV_FLOW_GEN_API2", line 945

      ORA-06512: at "APEX_040200.WWV_FLOW_GEN_API2", line 1105

      ORA-06512: at "APEX_040200.WWV_FLOW_GEN_API2", line 11325

      ORA-06512: at line 11

       

      Best Regard,

      Saeed