need help on download of CSV files

Hi all

I need to download a csv file in the table through browse file button. To do this, I created the process and function below. This method works perfectly fine when the file size is small. But I need to download the file size of 16 MB and when I try to download this file it give error wwv_flow.accept. Any expert from the TOP please help me about this error. As I am very new to the APEX, and I need to achieve this as soon as possible. Please provide any solution, I will be really grateful to the person.

function

create or replace function hex_to_decimal
-This function is based on one by Connor McDonald
-http://www.jlcomp.demon.co.uk/faq/base_convert.html
(P_hex_str in varchar2) return number
is
number of v_dec;
v_hex varchar2 (16): = '0123456789ABCDEF ';
Start
v_dec: = 0;
for indx in 1... Length (p_hex_str)
loop
v_dec: = v_dec * 16 + instr (v_hex, upper (substr(p_hex_str,indx,1)))-1;
end loop;
Return v_dec;
end hex_to_decimal;


Process of

DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
V_POSITION NUMBER;
v_clob_data CLOB: = 'nothing. '
dest_offset NUMBER: = 1;
offset NUMBER: = 1;
blob_csid NUMBER: = dbms_lob.default_csid;
lang_ctx INTEGER: = dbms_lob.default_lang_ctx;
caveat INTEGER;



v_raw_chunk RAW (10000);
v_char char (1);
number of c_chunk_len: = 1;
v_line VARCHAR2 (32767): = NULL;
v_data_array wwv_flow_global.vc_arr2;
number of v_rows;
number of v_sr_no: = 1;


BEGIN


delete from scg_recievables2;


-Read data from wwv_flow_files
Select blob_content from v_blob_data
of wwv_flow_files
where last_updated = (select max (last_updated) in the wwv_flow_files where UPDATED_BY =: APP_USER)
and id = (select max (id) in the wwv_flow_files where updated_by =: APP_USER);



v_blob_len: = dbms_lob.getlength (v_blob_data);
V_POSITION: = 1;


-Read and convert binary to a char
WHILE (v_position < = v_blob_len) LOOP
DBMS_LOB.converttoclob (v_clob_data, v_blob_data, v_blob_len, dest_offset, offset, blob_csid, lang_ctx, warning);
v_char: = dbms_lob.getlength (v_clob_data);


v_line: = v_line | v_char;
V_POSITION: = v_position + c_chunk_len;
-When a whole line is retrieved < / span >
IF v_char = Chr (10) THEN
-Convert comma to: use of wwv_flow_utilities
v_line: = REPLACE (v_line, ';', ' :');)
-Converting each column separated by: in the data table
v_data_array: = wwv_flow_utilities.string_to_table (v_line);
If IsNumber (substr (v_data_array (9), 1, 1)) = 1 then
v_data_array (9): = substr (v_data_array (9), 1, 11);
on the other
v_data_array (9): = January 1, 1900 ";
end if;
v_data_array (9): = NVL (v_data_array (9),'' 01-JAN-1900);
-Insert data into the target table
EXECUTE IMMEDIATE ' insert into scg_recievables2 (Account_receivable_number, the_account_number, bill_history_tran, service_number, item_type, the_amount_billed, the_remaining_amount, source_of_payment)


values (: 1,: 2:3:4: 5: 6: 7: 8,:' 9)
USING
v_data_array (1),
v_data_array (2),
v_data_array (3),
v_data_array (4),
v_data_array (5),
v_data_array (6),
v_data_array (7),
v_data_array (8);
-Remove
v_line: = NULL;
v_sr_no: = v_sr_no + 1;
END IF;


END LOOP;
END;

You're probably delay with your web server. Check the server logs to see if there are errors...

Thank you

Tony Miller
Webster, TX

A lady came up to me on the street, pointed at my suede jacket and said: "do you not know that a cow was murdered for that jacket?
' I didn't know there are witnesses ', I replied: "now, I'll have to kill you too. '

Tags: Database

Similar Questions

  • Please help to download a CSV file on APEX by browsing file

    Hi all

    I need to download a csv file in the table through browse file button. To do this, I created the process and function below. This method works perfectly fine when the file size is small. But I need to download the file size of 16 MB and when I try to download this file it give error wwv_flow.accept. Any expert from the TOP please help me about this error. As I am very new to the APEX, and I need to achieve this as soon as possible. Please provide any solution, I will be really grateful to the person.


    _ Function

    create or replace function hex_to_decimal
    -This function is based on one by Connor McDonald
    -http://www.jlcomp.demon.co.uk/faq/base_convert.html
    (P_hex_str in varchar2) return number
    is
    number of v_dec;
    v_hex varchar2 (16): = '0123456789ABCDEF ';
    Start
    v_dec: = 0;
    for indx in 1... Length (p_hex_str)
    loop
    v_dec: = v_dec * 16 + instr (v_hex, upper (substr(p_hex_str,indx,1)))-1;
    end loop;
    Return v_dec;
    end hex_to_decimal;


    _ Process

    DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    V_POSITION NUMBER;
    v_clob_data CLOB: = 'nothing. '
    dest_offset NUMBER: = 1;
    offset NUMBER: = 1;
    blob_csid NUMBER: = dbms_lob.default_csid;
    lang_ctx INTEGER: = dbms_lob.default_lang_ctx;
    caveat INTEGER;



    v_raw_chunk RAW (10000);
    v_char char (1);
    number of c_chunk_len: = 1;
    v_line VARCHAR2 (32767): = NULL;
    v_data_array wwv_flow_global.vc_arr2;
    number of v_rows;
    number of v_sr_no: = 1;

    BEGIN

    delete from scg_recievables2;

    -Read data from wwv_flow_files </span >
    Select blob_content from v_blob_data
    of wwv_flow_files
    where last_updated = (select max (last_updated) in the wwv_flow_files where UPDATED_BY =: APP_USER)
    and id = (select max (id) in the wwv_flow_files where updated_by =: APP_USER);


    v_blob_len: = dbms_lob.getlength (v_blob_data);
    V_POSITION: = 1;

    -Read and convert the binary for char </span >
    WHILE (v_position < = v_blob_len) LOOP
    DBMS_LOB.converttoclob (v_clob_data, v_blob_data, v_blob_len, dest_offset, offset, blob_csid, lang_ctx, warning);
    v_char: = dbms_lob.getlength (v_clob_data);

    v_line: = v_line | v_char;
    V_POSITION: = v_position + c_chunk_len;
    -When a whole line is retrieved < / span >
    IF v_char = Chr (10) THEN
    -Convert comma to: to use wwv_flow_utilities </span >
    v_line: = REPLACE (v_line, ';', ' :');)
    -Converting each column separated by: in the data table </span >
    v_data_array: = wwv_flow_utilities.string_to_table (v_line);
    If IsNumber (substr (v_data_array (9), 1, 1)) = 1 then
    v_data_array (9): = substr (v_data_array (9), 1, 11);
    on the other
    v_data_array (9): = January 1, 1900 ";
    end if;
    v_data_array (9): = NVL (v_data_array (9),'' 01-JAN-1900);
    -Insert data into the table target </span >
    EXECUTE IMMEDIATE ' insert into scg_recievables2 (Account_receivable_number, the_account_number, bill_history_tran, service_number, item_type, the_amount_billed, the_remaining_amount, source_of_payment)

    values (: 1,: 2:3:4: 5: 6: 7: 8,:' 9)
    USING
    v_data_array (1),
    v_data_array (2),
    v_data_array (3),
    v_data_array (4),
    v_data_array (5),
    v_data_array (6),
    v_data_array (7),
    v_data_array (8);
    -Remove
    v_line: = NULL;
    v_sr_no: = v_sr_no + 1;
    END IF;

    END LOOP;
    END;

    As mentioned, this disrupts the question, because a possible answer was published in the OTHER thread... Check your server logs, you probably delay... Preliminary discussions with a similar problem:

    Take a look at the httpd.conf file (or get your system administrator to look at it) and see what's on the value of TimeOut. You may need to increase in order to export large tables by APEX.

    http://www.apacheref.com/ref/http_core/timeout.html

    Thank you

    Tony Miller
    Webster, TX

    A lady came up to me on the street, pointed at my suede jacket and said: "do you not know that a cow was murdered for that jacket?
    ' I didn't know there are witnesses ', I replied: "now, I'll have to kill you too. '

  • I need help with a problem of file softdub.dll any answers or how to replace it?

    I need help with a problem of file softdub.dll all the answers, or how to replace it?  Yes, it's a problem of Vista vs itunes and apparently I lost? This file somehow.  I have no idea how blessed remedy.  I tried all the normal fixes / easy I know, but I am a novice at best.  so please, be gentle and try to guide me through a response.  Please, I beg you!

    Hello

    Did you download and save iTunes on the desktop > then right-click > select run as administrator to install?

    If you don't have anything done, see if this information helps you.

    "Not to install iTunes or QuickTime for Windows"

    http://support.Apple.com/kb/HT1926

    «Remove and reinstall iTunes, QuickTime, and other software components for Windows Vista or Windows 7»

    http://support.Apple.com/kb/HT1923

    If the advice already given does not, please contact Apple for assistance.

    "iTunes support-how to use iTunes.

    http://www.Apple.com/support/iTunes/

    "Contact iTunes Support.

    http://www.Apple.com/support/iTunes/contact/

    Or ask in the community Apple iTunes:

    https://discussions.Apple.com/community/iTunes

    See you soon.

  • How to download the Csv file with column headers

    Hi all

    This is pavan, using Apex version 4.2.3


    I am trying to download the csv file I followed this link , and I'm able to download excel with headers, when I try to download with headers of this error "'ORA-01858: a non-digit character was found here where was waiting for a digital" I searched in google but could not find the right solution, "


    can anyone help on this please.

    Thanks in advance,


    Kind regards

    Pavan

    This article is 6 years old.

    You should study the solutions that are available for APEX 4.2: data loader or the 'Excel2Collection' plugin (which also manages the CSV files).

    Data Loader

    It is a wizard that generates an Assistant for your application.

    Excel2Collection

    You will use the Excel2Collection (in a single process) to convert the BLOB in a Collection

    Then, in a 2nd address), you just do a "INSERT...". SELECT statement.  Add ' where seq_id > 1 "for files with a header.

    MK

    PS - Use the "EXECUTE IMMEDIATE" article is not necessary.

  • Need help to download and use MovieMaker

    Need help to download and use MovieMaker.  I have XP Home Edition Version 2002 SP 3.  Could not locate moviemaker. Read somewhere that it was in SP2. How can I go about it? Since it puts I have SP3, I have to add SP2 or how do I go about this? THX

    Hi Boolaboola,

    MovieMaker is a separate program and is not installed in the service pack. Here is a link to download the latest version (Windows Live Movie Maker), more tutorials, articles, and much additional information on Windows Movie Maker:

    Movie Maker:

    Windows Live Movie Maker download:

    http://download.live.com/MovieMaker?WA=wsignin1.0

    Getting started with Windows Movie Maker

    http://Windows.Microsoft.com/en-us/Windows-Vista/getting-started-with-Windows-Movie-Maker

    Articles and tutorials for Windows Movie Maker

    http://www.windowsmoviemakers.NET/tutorials/

    How to-tutorials - Movie Maker

    http://www.myvideoproblems.com/tutorials/MovieMaker/TutorialsMovieMaker.htm

    Hope this helps,

    Steve <> Microsoft Partner

  • I need to download my previous purchase of CS6 Adobe on my new PC.  I have the old activation sequence but I need help to download sice, I don't have the DVD?

    Need help in downloading my previous purchase of CS6 on my new PC?

    [Duplicate message deleted... post the same question more than once is confusing... MOD]

    [This is an open forum, not a direct line to Adobe support... you have to wait a response]

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a way to go to a page to download the Adobe programs if you do not have a disk or drive

    -Cloud desktop http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html

    -Cloud Getting Started https://helpx.adobe.com/creative-cloud.html

    -you will need to enter your original serial number during the installation for non-Cloud programs

    - or kglad links in response to #1 here can help https://forums.adobe.com/thread/2081216

    Also go to https://forums.adobe.com/community/creative_cloud/creative_cloud_faq

    IF Windows 10 read below

    Cloud & Win10 https://helpx.adobe.com/creative-cloud/kb/Windows_10_compatibility_FAQ.html

    -In addition, only CURRENT products will be tested and updated for compatibility with Windows 10

    - so if you have an older program, update you to Windows 10 at YOUR risk of problems

    -You can get CS6 and previous programs to install and run, or you can not (some do, some don't)

    An idea that MAY work to install or run some programs in Windows 10 old... works for some, not for others

    -http://www.tenforums.com/tutorials/15523-compatibility-mode-settings-apps-change-windows-1 0 - a.html

    - or run as Administrator http://forums.adobe.com/thread/969395 to assign FULL permissions can help... said yet, but sometimes it is necessary for all Adobe programs (this is same as using an administrator account)

  • need help with download of cc. gives error 1001 whenever I install.

    need help with download of cc. gives error 1001 whenever I install.

    Hello

    Please see the thread: https://forums.adobe.com/thread/2106211 and CC update crash! Error code: 1001

    Also, please see the article: https://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html

    Please write if it helps.

    Kind regards

    Shelly

  • Publish everything by downloading a CSV file in a form

    We have a master (M) and detail (D) registration form. The main block and can display 5 files at once (multi block)

    The recordings will be filled by downloading a CSV file from the hard drive.

    Question

    If there are 5 records in the csv file, the download works correctly. If this isn't the case, it won't be very good.

    We were wondering if there is a few BLOCKS / WEB of property should be defined, which will allow more than 5 documents to download

    Please provide your valuable suggestions

    Thank you

    "Error in the filling of the block" isn't an oracle error message. When the error appears, like her "FRM - 12345 Text". Please post the 3 initial letters and the number 5-digits of the error. Also you said nothing about your version of forms or code that you use to fill the block.

  • I need help download I need help to download Adobe Acrobat 9.0 Pro

    Hi I need help download I need help to download Adobe Acrobat 9.0 Pro

    I don't have the disc, no more, but I have my product key.

    I have a Toshiba with win 10 operating system.

    the activation key is for a mac. can I get a key for win. ? @Adobe.com

    If Yes please send me the link

    If this isn't what the link for me to load it now if I buy a mac and win.

    When and if I get another Mac.

    I can't get a victory for this software download option or if I can't get another mac computer then

    Unfortunately have to sell or trade and I like the software for the school and the company

    I need help please and thank you

    This version is too old to qualify for a swap of platform.  If you have a license Mac and a Windows machine, you're stuck pretty well.  Anyway, here is the link to the version 9... You should check if they have a Mac download...

    Acrobat 9: 8 - http://helpx.adobe.com/acrobat/kb/acrobat-8-9-product-downloads.html

  • I need help to download Adobe Creative Suite Design Premium CS5

    Hi I need help download I need help to download Adobe Creative Suite Design Premium CS5

    I don't have the disc, no more, but I have my product key.

    I have a Toshiba with win 10 operating system.

    the activation key is for a mac. can I get a key for win. ? @Adobe.com

    If Yes please send me the link

    If this is not the case, the link for me to download on mac if I get another Mac. computer.

    I can't get a victory for this software download option or if I can't get another mac computer then

    Unfortunately I'll have to sell or trade and I like the software for the school and the company

    I need help please and thank you

    CS5 - http://helpx.adobe.com/creative-suite/kb/cs5-product-downloads.html

    The same story applies to this with your post about Acrobat 9 - Mac license does not work for a Windows machine and this version is too old to qualify for a swap of platform.

  • I need help to download free Adobe Reader XI &amp; Flash for my new tablet.  Who can help me?

    I need help to download and install Adobe Reader XI & Flash Player freed.

    IOS Android or ? or Windows Tablet?

  • Need help to download and install Acrobat Pro

    Need help to download and install Acrobat Pro

    Hello

    Please see the link below for download: -.

    https://helpx.Adobe.com/Acrobat/KB/Acrobat-downloads.html

  • Hello, I need help to download adobe photoshop cs5.

    Hello, I need help to download adobe photoshop cs5.  When you go to click in the trial version free stays loading and nothing happens. What will happen?

    I need this program for a work at home.

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If he continues to not try to use a different browser.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    CS5: http://prodesigntools.com/all-adobe-cs5-direct-download-links.html

  • Need help to download Adobe Creative suite 6 standard in on a mac

    Need help download Adobe Creative suite 6 standard in a Mac Need help to download Adobe Creative suite 6 standard in on a mac

    Hi, Norma.

    To find your serial number, sign in to your Adobe account Adobe: creative, marketing, and document management solutions .

    On the page for managing accounts that appears, all of your registered products and their serial numbers are listed in the section Plans & products.

    Let me know if it helps.

    Concerning

    Megha Rawat

  • I need help to download Adobe Acrobat Pro XI

    I need help to download Adobe Acrobat Pro XI. I have been using Acrobat XI Std and purchased an upgrade for $199 upgrade to Acrobat Pro XI. Went through the download procedure prescribed. The download procedure have not upgraded to XI Pro and my program remains XI Std. How this can be fixed.

    Hi pzadoretzky

    Please download Acrobat XI pro below link: http://www.adobe.com/go/tryacrobatpro/

    Use your serial number to activate it

Maybe you are looking for