Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Display Word documents stored in the database

73pixieGirlSep 24 2009 — edited Sep 25 2009
Hello,
I'm trying to display the contents of a Word document that has been uploaded to the database, but I'm not having any luck. I tried to run the following package in the SQL Command window and I get a blank screen -
create or replace package doc_get
as
    procedure doc( pid in apex_application_files.id%type );
end;

create or replace package body doc_get
as
procedure doc( pid in apex_application_files.id%type )
is
    l_lob    blob;
    l_amt    number default 1;
    l_off   number default 1;
    l_raw   raw(32767);
begin
    select blob_content into l_lob from apex_application_files where id = pid;
    owa_util.mime_header( 'application/msword' );
        begin
           loop
              dbms_lob.read( l_lob, l_amt, l_off, l_raw );
              htp.prn( utl_raw.cast_to_varchar2( l_raw ));
              l_off := l_off+l_amt;
              l_amt := 32767;
           end loop;
        exception
           when no_data_found then 
              NULL;
        end;
end;
end;
I just need to display the text in an item or report...any idea what the problem is?
Thank you,
Tammy

Edited by: 73pixieGirl on Sep 24, 2009 1:17 PM

Edited by: 73pixieGirl on Sep 24, 2009 1:36 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2009
Added on Sep 24 2009
22 comments
2,487 views