Home » Developer & Programmer » Application Express & MOD_PLSQL » Ora Apex & external files (Ora Application Express, Windows XP Prof. V002 SP2 English)
Ora Apex & external files [message #347586] Fri, 12 September 2008 04:37 Go to next message
Messages: 1
Registered: September 2008
Location: Hungary
Junior Member
I have files (for example pdf. documents, for example 102.pdf) in the OS file system, in the directory C:\oradoc and

in Apex some information (for example the number of the file: 102) about each file.

What I want: I want to push a button in Apex page next to the 102 file and see in Acrobat Reader the 102.pdf file.

Re: Ora Apex & external files [message #348454 is a reply to message #347586] Tue, 16 September 2008 16:40 Go to previous message
andrew again
Messages: 2574
Registered: March 2000
Senior Member
If you're using Oracle XE, then you'll be using the built in HTTP server (EPG - embedded PL/SQL gateway) and it can't access O/S level files directly.

If that's the case, you can load the file into a BLOB column or just load it into the XML DB where the rest of the Apex images reside. Load it into "i", "public" or whatever.

--create or replace directory ABC_DIR as 'C:\ABC\';
        rv boolean;
          DBMS_XDB.DELETERESOURCE('/public/my_doc.pdf', DBMS_XDB.DELETE_FORCE);
          when others then null;
        rv := dbms_xdb.createResource('/public/my_doc.pdf',
        if not rv then raise_application_error (-20501, 'Failed to load PDF into XDB'); end if;

Check that you can access the file directly from the URL, then you can integrate in into a page later.


Previous Topic: SELECT INTO - value of variable after "too many rows" exception
Next Topic: Bind variables empty
Goto Forum:

Current Time: Tue Jul 29 18:38:20 CDT 2014

Total time taken to generate the page: 0.13610 seconds