How to Store PDF files In the Oracle Database?

Hi All,
It is required for me to store the PDF files in the Database and retrieve it back whenever necessary.
Also I need to store it with some security. So no one can read the content of the file.
Please give me solution to these problems.
Thanks

vasav wrote:
Hi All,
It is required for me to store the PDF files in the Database and retrieve it back whenever necessary.Why not save the files to disk and store a link to the file in the database instead?
Also I need to store it with some security. So no one can read the content of the file.Authenticate users requesting files.
Please give me solution to these problems.There are many possible solutions for your requirements.

Similar Messages

  • HT4847 how to store pdf files on iCloud ?

    how to store pdf files on iCloud ?

    Hi SirNicksolot
    After move the pdf to iCloud, how do I retrieve it from my iPad or other Mac computer after using Preview to move pdf file to iCloud?

  • How to load text file data to Oracle Database table?

    By using Oracle Forms, how to load text file data to Oracle Database table?

    Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.

  • How to save pdf file(path) in oracle db

    Hi all,
    we are using forms 10g. the requirement is user can upload the pdf file from the forms. the pdf file should store in the server folder and the path can store in the db table field. when ever the user wish to download that pdf based up on the unique pdf name that should be open or save on client machine.
    can anybody help me how to do this
    Thank you

    Hi Amatu Allah,
    thank you for your reply
    i have the code based upon the webutil functions but it is not working can u pls help me
    Here---B8 is Block name
    if :toolbar.li_mode in('M') then
         if :b8.pdf_loc1 is not null then          
    declare
    l_success boolean;
    BEGIN
         mesg(1);
    l_success := webutil_file_transfer.Client_To_DB_with_progress
    (:b8.pdf_loc1-------------------------------------------------------------------------------------source file location,
    't002pod_pdf', ---------------------------------------------------------------------------------table name
    'pdf',-----------------------------------------------------------------------------------------------column name
    'doc_no = :b8.doc_no',---------------------------------------------------------------------doc_no is field
    'Upload to Database in progress',
    'Please wait',
    false,
    null
    if l_success
    then
    message('File uploaded successfully into the Database');
    else
    message('File upload to Database failed');
    end if;
    exception
    when others
    then
    message('File upload failed: '||sqlerrm);
    END;
    else
         mesg('Plese Select The File name');
         go_item('B8.pdf_open');
         end if;
    end if;
    ---------------------------------------------------------------------WEBUTIL FUNCTION BODY------------------------------------------------------------------------
    FUNCTION Client_To_DB_With_Progress
    ( clientFile in VARCHAR2,
    tableName in VARCHAR2,
    columnName in VARCHAR2,
    whereClause in VARCHAR2,
    progressTitle in VARCHAR2,
    progressSubTitle in VARCHAR2,
    asynchronous in BOOLEAN default FALSE,
    callbackTrigger in VARCHAR2 default NULL) return BOOLEAN is
    BEGIN
    return UploadInt
    ( clientFile,
    tableName,
    columnName,
    whereClause,
    true,
    true,
    progressTitle,
    progressSubTitle,
    asynchronous,
    callbackTrigger);
    END Client_To_DB_With_Progress;
    -- Internal implementations ----
    FUNCTION UploadInt ( clientFile in VARCHAR2,
    spec1 in VARCHAR2,
    spec2 in VARCHAR2,
    spec3 in VARCHAR2,
    toDB in BOOLEAN,
    withProgress in BOOLEAN,
    progressTitle in VARCHAR2,
    progressSubTitle in VARCHAR2,
    asynchronous in BOOLEAN default FALSE,
    callbackTrigger in VARCHAR2 default NULL) return BOOLEAN is
    clientFileSize PLS_INTEGER := 0;
    clientFileChunks PLS_INTEGER := 0;
    clientFileInfo VARCHAR2(1000 char);
    result BOOLEAN := FALSE;
    dataBuffer VARCHAR2(32767);
    ignore VARCHAR2(2);
    jobj ORA_JAVA.JOBJECT;
    lastErrorCode PLS_INTEGER;
    lastErrorArgs VARCHAR2(1000);
    encodedFile ORA_JAVA.JOBJECT;
    ftemp TEXT_IO.FILE_TYPE;
    tempFileName VARCHAR2(512);
    bool_ignore boolean;
    BEGIN
         mesg('inside function--2');
    -- Client file cannot be null
    if clientFile is null then
    raise CLIENT_FILE_NULL;
    end if;
    -- AS file cannot be null. AppsServerFileWriter also handles this. Better to handle here.
    if NOT toDB AND spec1 is null then
    raise AS_FILE_NULL;
    end if;
    -- Make sure the client file to be uploaded exists and readable
    -- If we don't raise exception here, we end up creating an empty file on DB or AS
    if NOT webutil_file.file_is_readable(clientFile)
    OR webutil_file.file_is_directory (clientFile) then
    raise FILE_NOT_FOUND;
    end if;
    -- First check to see if a transfer is not currently happening
    if In_Progress then
    raise AGENT_BUSY;
    end if;
    -- reset the target
    m_toDB := toDB;
    -- Set up the file info
    clientFileInfo := clientFile||'|0|'||
    WEBUTIL_UTIL.BoolToStr(asynchronous,'A|','S|')||
    WEBUTIL_UTIL.BoolToStr(withProgress,'Y|','N|')||
    progressTitle||'|'||
    progressSubTitle;
    WebUtil_Core.setProperty(WebUtil_Core.WUT_PACKAGE,'WUT_FILE_INFO', clientFileInfo);
    mesg('clietfileinfo: '||clientFileInfo);
    -- get the size and chunk info of the client side file
    clientFileInfo := WebUtil_Core.getProperty(WebUtil_Core.WUT_PACKAGE,'WUT_FILE_INFO');
    clientFileSize := DelimStr.getNumber(clientFileInfo,1,true,'|');
    mesg('size: '||clientFileSize);
    if clientFileSize = 0 then
    raise CLIENT_FILE_EMPTY;
    -- no need to close AS file since it is not yet opened.
    end if;
    clientFileChunks := DelimStr.getNumber(clientFileInfo,2,true,'|');
    -- Set up the Open command
    if toDB then
    if not m_DBEnabled then
    raise TRANSFER_FORBIDDEN;
    end if;
    if not WebUtil_DB_Local.openblob(spec1, spec2, spec3,'W', m_maxTransferSize) then
    WebUtil_core.Error(WebUtil_Core.WUT_PACKAGE,WebUtil_DB_Local.getLastError,
    'WEBUTIL_FILE_TRANSFER.uploadInt');
    raise READWRITE_ERROR;
    end if;
    else
    if not WebUtil_Core.checkJava then
    raise NO_JAVA;
    end if;
    if not checkASACL(spec1,m_writeACL) then
    raise TRANSFER_FORBIDDEN;
    end if;
    jobj := JAVA_APPSERV_WRITER.NEW;
    if not JAVA_APPSERV_WRITER.openFile(jobj,spec1) then
    lastErrorCode := JAVA_APPSERV_WRITER.getLastError(jobj);
    lastErrorArgs := JAVA_APPSERV_WRITER.getLastErrorArgs(jobj) ;
    WebUtil_core.Error(Webutil_Core.WUT_PACKAGE,lastErrorCode,
    'WEBUTIL_FILE_TRANSFER.uploadInt',lastErrorArgs);
    raise READWRITE_ERROR;
    end if;
    end if;
    -- Is this Async? if So we do nothing more here just set the callback and kick it off
    if asynchronous then
    -- set callbackTrigger even if it is null. we will take care
    -- before calling
    WebUtil_Core.SetCallbackTrigger(-1,callbackTrigger);
    ignore := WebUtil_Core.getProperty(WebUtil_Core.WUT_PACKAGE,'WUT_TRANSFER');
    m_chunks := clientFileChunks;
    m_fileSize := clientFileSize;
    m_uploadSucceeded := NULL;
    if not toDB then
    m_persistObj := ORA_JAVA.NEW_GLOBAL_REF(jobj);
    end if;
    result := true;
    else
    if NOT toDB then
    encodedFile := JAVA_FILE.createTempFile('WUAS','.enc');
    tempFileName := JAVA_FILE.getPath(encodedFile);
    end if;
    -- loop through each chunk
    for i in 1..clientFileChunks LOOP
    dataBuffer := WebUtil_Core.getProperty(WebUtil_Core.WUT_PACKAGE,'WUT_TRANSFER',false);
    if (WebUtil_Core.isError) or (dataBuffer is null) then
    raise AGENT_BUSY;
    end if;
    -- Write to the correct place
    if toDB then
    WebUtil_DB_Local.WriteData(dataBuffer);
    else
    ftemp := TEXT_IO.FOPEN(tempFileName, 'W');
    TEXT_IO.PUT(ftemp, dataBuffer);
    TEXT_IO.FCLOSE(ftemp);
    -- if not JAVA_APPSERV_WRITER.WriteData(jobj,dataBuffer) then
    if not JAVA_APPSERV_WRITER.decodeBASE64File(jobj,tempFileName) then
    lastErrorCode := JAVA_APPSERV_WRITER.getLastError(jobj);
    lastErrorArgs := JAVA_APPSERV_WRITER.getLastErrorArgs(jobj) ;
    WebUtil_core.Error(Webutil_Core.WUT_PACKAGE,lastErrorCode,
    'WEBUTIL_FILE_TRANSFER.UploadInt',lastErrorArgs);
    raise READWRITE_ERROR;
    end if;
    end if;
    end LOOP;
    if toDB then
    if WebUtil_DB_Local.CloseBlob(clientFileSize) then
    result := true;
    else
    WebUtil_core.Error(Webutil_Core.WUT_PACKAGE,WebUtil_DB_Local.getLastError,
    'WEBUTIL_FILE_TRANSFER.UploadInt');
    end if; -- close
    else
    bool_ignore := JAVA_FILE.DELETE_(encodedFile);
    if JAVA_APPSERV_WRITER.CloseFile(jobj,clientFileSize) then
    result := true;
    else
    lastErrorCode := JAVA_APPSERV_WRITER.getLastError(jobj);
    lastErrorArgs := JAVA_APPSERV_WRITER.getLastErrorArgs(jobj) ;
    WebUtil_core.Error(Webutil_Core.WUT_PACKAGE,lastErrorCode,
    'WEBUTIL_FILE_TRANSFER.UploadInt',lastErrorArgs);
    raise READWRITE_ERROR;
    end if;
    end if;
    end if; -- async
    return result;
    EXCEPTION
    when CLIENT_FILE_EMPTY then
    WebUtil_Core.Error(Webutil_Core.WUT_PACKAGE,133,'WEBUTIL_FILE_TRANSFER.UploadInt', clientFile);
    return false;
    when CLIENT_FILE_NULL then
    WebUtil_Core.Error(Webutil_Core.WUT_PACKAGE,130,'WEBUTIL_FILE_TRANSFER.UploadInt');
    return false;
    when AS_FILE_NULL then
    WebUtil_Core.Error(Webutil_Core.WUT_PACKAGE,117,'WEBUTIL_FILE_TRANSFER.UploadInt');
    return false;
    when FILE_NOT_FOUND then
    WebUtil_Core.Error(Webutil_Core.WUT_PACKAGE,129,'WEBUTIL_FILE_TRANSFER.UploadInt', clientFile);
    return false;
    when TRANSFER_FORBIDDEN then
    WebUtil_Core.Error(Webutil_Core.WUT_PACKAGE,121,'WEBUTIL_FILE_TRANSFER.UploadInt');
    return false;
    when AGENT_BUSY then
    WebUtil_Core.Error(Webutil_Core.WUT_PACKAGE,116,'WEBUTIL_FILE_TRANSFER.UploadInt');
    return false;
    when READWRITE_ERROR then
    return false;
    when NO_JAVA then
    return false;
    when WebUtil_Core.BEAN_NOT_REGISTERED then
    WebUtil_Core.ErrorAlert(WebUtil_Core.getImplClass(WebUtil_Core.WUT_PACKAGE)
    ||' bean not found. WEBUTIL_FILE_TRANSFER.UploadInt will not work');
    RAISE FORM_TRIGGER_FAILURE;
    when WebUtil_Core.PROPERTY_ERROR then
    RAISE FORM_TRIGGER_FAILURE;
    END UploadInt;

  • How to Save pdf file in the BLOB field in the database

    I have to save a pdf file which is on the client machine to save in the database column of type BLOB. How can i do that?

    LostWorld wrote:
    I have to save a pdf file which is on the client machine to save in the database column of type BLOB. How can i do that?PL/SQL code cannot hack across the network. break into that client machine, and read that PDF file from the client's harddrive.
    There is a very fundamental client-server principle at stake here - the purpose of the client. What is the purpose of the client? Amongst others, it is to interface with the client hardware and peripherals and devices. Like reading the client keyboard and sending that to the server. Or reading data from the sever and rendering it on the client's display device. Or to receive CSV data from the server and writing it to a local file.
    It's purpose is also to read a local file, like a PDF file, and submit that file's contents to the server for storage.
    The following pseudo code explains the basic principle:
    client
      // call oracle to create a LOB
      ExecuteSQL( 'DBMS_LOB.CreateTemporary( .. )' )
      open file( fileHandle )
      while not EOF( fileHandle )
        // read data from the file
        read file( fileHandle, buffer )
        // write this buffer to the LOB in Oracle
        ExecuteSQL( 'DBMS_LOB.writeAppend( .. )' )
      end while
      close file( fileHandle )
      // now tell Oracle what to do with that LOB
      ExecuteSQL( '...' )
      .. etc..Thus the client:
    a) creates a LOB in Oracle via a PL/SQL call
    b) passes data from the client and appends it to the LOB
    c) tells Oracle what to do with LOB, such as inserting it into a table

  • How to store PDF files in a table

    Hi,
    Is there a way to store PDF files in a table? Do I use LOB? How do I automatically read them if I want them to be available in a web site?
    Thanks.
    Camille

    U have to use either BLOBs (internal LOBs) or BFILEs (external LOBs). check out docu. at http://www.akadia.com/services/ora_blob.html

  • HT5663 How to store PDF files in iCloud?

    Is there a way to store PDF files in iCloud? I see that Preview supposedly stores PDF's in iCloud, but when I try it, I cannot find the file in iCloud.

    Sorry AMCarter3, my bad.  While it used to be in GoodReader they apparently removed it some time ago, supposedly for some legal reasons?
    I too use GoodReader primarily with dropbox and box so had not noticed it was gone.
    As an aside, for those apps that support iCloud storage, if you have a Mac, enable Documents & Data in the iCloud control panel.  That will make a folder on your hard drive, named "Mobile Documents" that is your local mirror of your iCloud folders.  Apps that sync their content to iCloud will make a folder for themselves when they first conntect to iCloud, and that folder will in turn get created as a sub-folder in Mobile Documents on your Mac (I still have my one for Goodreader, "JFJWWP64QD~com~goodiware~GoodReader", along with ones for Pages, Numbers, and a host of others). 
    You can then drag and drop any file you wish into that folder (as long as it is a file type supported by the app), and they will then sync to iCloud.  You then use the app and download them for use on your iOS device from within the app.  That folder on your Mac will be updated whenever it changes and your Mac has internet access to iCloud.
    But, for PDFs in Goodreader, yes, dropbox works great, and has their free companion app for OS X if you want things on your computer to sync automatically too.

  • How to Generate PDF file on the server

    Hello Everybody !
    I Need to generate a PDF File on the server, and I'm usin the command :
    "OPEN DATASET p_path FOR OUTPUT IN BINARY MODE message l_verro .
           LOOP AT t_lines.
             TRANSFER t_lines-tdline TO p_path.
           ENDLOOP.
           CLOSE DATASET p_path.  "
    The File was generated, but is corrupt . Don't Open the file, It's wrong.
    When I use the function GUI_DOWNLOAD the file is generated  right. But in the server not.
    Can someone help me please ??
    Best Regards,
    Wagner Duarte

    Hi.
    did you check this post?
    Download PDF File to SAP Application Server
    It doest the same as you are asking.
          " Write PDF Binary Data to App Server
        OPEN DATASET lv_filename FOR OUTPUT IN BINARY MODE.
        IF sy-subrc = 0.
          LOOP AT lines INTO ls_data.
            TRANSFER ls_data TO lv_filename.
          ENDLOOP.
        ENDIF.
        CLOSE DATASET lv_filename.
    Regards
    Miguel

  • How to display PDF file, inside the SWF file or flash exe file

    I  have create the application for Employee details using flash actionscript 3.0
    This application is to view the organization employee details, iam using the tree component in this application,
    the tree component is to get the dada via xml file, this xml file save in the remote server ,
    I display the PDF file inside the swf file to using " StageWebView" class . Then i goto Publish Setting to change the  player Adobe Air 2.6 and run the flash file using
    ctr-l + Enter . It is work correctly the PDF file is Displayed inside the Swf Output. But I Publish this file to exe . then i run the exe it is not working .
    The application is run The xml data is onely get and displayed the Tree component then i click the tree item employee name the xml data in not display and the pdf file is not open .
    Pls Help...................

    hi i need to display the pdf file inside the swf file or flash exe file .
    I use the navigateToURL class this is open the pdf file on the browser. I want to display the pdf file in the swf window .
    Please suggest.

  • View pdf file stored in oracle database through oracle forms

    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle Query Builder 10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.2 (Production)
    Oracle Tools GUI Utilities Version 10.1.2.0.2 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE     10.1.0.4.0     Production
    I have created external directory and am able to load pdf files in oracle database table called test_blob.
    CREATE TABLE test_blob (
    id NUMBER(15)
    , file_name VARCHAR2(1000)
    , image BLOB
    , timestamp DATE
    I have 2 pdf files in the table. I want to view this pdf from forms when the user clicks on the button. On when-button-pressed trigger I want to show pdf on the screen. Any help is appreciated. Not on the designer. I want to run form application.
    SELECT id, file_name,
    DBMS_LOB.GETLENGTH(image) Length,
    timestamp
    FROM test_blob
    ID|FILE_NAME|LENGTH|TIMESTAMP
    1001|2011 HeartlandEmployeeReferralCard.pdf|353718|1/28/2013 11:44:41 AM
    1002|2011 HeartlandEmployeeReferralCard.pdf|353718|1/28/2013 11:51:07 AM
    Edited by: user_anumoses on Jan 28, 2013 11:45 AM

    We were able to do the same thing with Oracle Application Server and Oracle WebLogic Server. I cannot remember how different the processes were, but it seems like they were very similar. I am going to give you the instructions on how we implemented a "Read PDF" procedure on the WebLogic Server. If you are still on the Application Server you may have to do some Google searches, but it all boils down to the mod_plsql DAD Configuration file.
    Our PDF was located in a table with the following structure:
    CASE_DOCUMENTS
       (id_document                    NUMBER NOT NULL,
        doc_blob                       BLOB,
        note                           VARCHAR2(240),
        created_by                     VARCHAR2(20) NOT NULL,
        created_dt                     DATE NOT NULL,
        case_id                        NUMBER NOT NULL,
        filename                       VARCHAR2(100) NOT NULL)Based on that table structure we created a procedure named READ_PDF which you will reference below in the dads.conf file below:
    CREATE or REPLACE procedure read_pdf (p_id_document IN number)
    is
      view_file     blob;
    BEGIN
      select doc_blob
        into view_file
        from case_documents
       where id_document = p_id_document;
      OWA_UTIL.MIME_HEADER ('APPLICATION/PDF', FALSE);
      HTP.P ('CONTENT-LENGTH: ' || DBMS_LOB.GETLENGTH (view_file));
      OWA_UTIL.http_header_close;
      WPG_DOCLOAD.download_file (view_file);
    END;
    GRANT EXECUTE ON read_pdf TO financial_user_role  -- Name of role to execute
    /Basically, you are passing in one parameter and that is the primary key for your table. You are selecting the pdf stored in a BLOB for that primary key. The commands below that allow the pdf to open up so you can view it – we got this off some search we did a few years ago.
    Now, you need to add logic to your Oracle Form that will call the procedure above, but the URL is based on the dads.conf file that we will set up below… Anyway, we created a button on the form module with a label of "View". In the WHEN-BUTTON-PRESSED trigger the logic looks like this:
    -- The View logic uses the DAD (Database Access Descriptors) method to view a .pdf file from the form.
    -- The DAD was created on WebLogic Server  with the name findadgen.  This allows an http request be made
    -- to the database.
    declare
      v_file          varchar2(400);
      v_success       boolean;
      ret_val         number;
      v_http_link     varchar2(400);
    begin
      -- The format of the link is as follows: hostname:port/pls/DAD_name/procedure_name
      v_http_link := 'http://finas03:8888/pls/findadgen/read_pdf?p_id_document=' || :case_documents.id_document;
      web.show_document(v_http_link, '_BLANK');
    end;The name of our WebLogic Server is "finas03" so that is what is listed in the URL. The "findadgen" is the name of the <Location> in the dads.conf file below, the "read_pdf" is the name of the procedure we created above, the "p_id_document=" is the IN parameter listed in the READ_PDF procedure created above, and the ":case_documents.id_document" is the reference to the primary key in our Oracle Form.
    For WebLogic, you can either go through Enterprise Manager (directions below) or update the dads.conf file on the filesystem directly (if you update the dads.conf file directly then skip to step 4 and ignore step 5):
    1.     Enterprise Manager -> Web Tier -> ohs1
    2.     Oracle HTTP Server (pull-down) – Administration – Advance Configuration
    3.     Select File – dads.conf
    4.     Add something similar:
    # ============================================================================ 
    #                     mod_plsql DAD Configuration File                         
    # ============================================================================ 
    # 1. Please refer to dads.README for a description of this file                
    # ============================================================================  
    # Note: This file should typically be included in your plsql.conf file with 
    # the "include" directive. 
    # Hint: You can look at some sample DADs in the dads.README file 
    # ============================================================================
    <Location /pls/findadgen>
        SetHandler pls_handler
        Order allow,deny
        Allow from All
        AllowOverride None
        PlsqlDatabaseUsername financial
        PlsqlDatabasePassword sdo_3#d1
        PlsqlDatabaseConnectString ffindbTNSFormat
        PlsqlNLSLanguage AMERICAN_AMERICA.WE8ISO8859P1
        PlsqlAuthenticationMode Basic
        PlsqlDefaultPage read_pdf
    </Location>You are adding the <Location> section to your dads.conf file. The "finddadgen" is the name that you will reference in a change you fill make to your Oracle Form. The "financial" is the Schema, the "sdo_3#d1" is the password for that Schema, the "ffindb" is the database that the stored procedure is located on, and the "read_pdf" is a stored procedure you will have to create in order to read the pdf.
    5.     Press the "Apply" Button
    6.     Obfuscate the DAD password by running the dadTool.pl script located in $ORACLE_HOME/bin (This was done on Unix on our server with the following commands):
    $> LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
    $> cd $ORACLE_HOME/bin
    $> perl dadTool.pl -f /u01/app/oracle/middleware/asinst_1/config/OHS/ohs1/mod_plsql/dads.conf
    7.     Restart the Oracle HTTP Server using Fusion Middleware Control:
    Enterprise Manager -> Web Tier -> ohs1
    Oracle HTTP Server – Control – Shutdown
    Oracle HTTP Server – Control – Start Up
    If you followed the instructions above, you should have created a stored procedure, added logic to your Oracle form to reference that stored procedure, and created an entry in the dads.conf file. Once you move the form onto the server and you restart the HTTP Service, you should be able to view a pdf that is stored in a table directly from your Oracle Form.

  • How to store PDF file in BLOB column without using indirect datastore

    Hi ,
    I want to store a pdf file in a BLOB column.
    But , it should be a direct store. I cannot usre indirect datastore.
    BLOB column doesn't support indirect datastore. I get the following error.
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10581: indirect datastores cannot be used with long or lob text columns
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 365
    can anyone give me any clue onhow to manage this issue?

    Thanks This really helped.
    For other readers, I am summarising what I did.
    create table test
    id number primary key,
    docs BLOB
    create or replace directory doc_loc
    as 'c:\test';
    CREATE OR REPLACE PROCEDURE Load_BLOB_From_File (file_name in varchar2)
    AS
    src_loc bfile:= bfilename('DOC_LOC',Load_BLOB_From_File.file_name);
    dest_loc BLOB;
    begin
    insert into tkctsf15t values(1,empty_blob()) returning docs
    into dest_loc;
    dbms_lob.open(src_loc,DBMS_LOB.LOB_READONLY);
    DBMS_LOB.OPEN(dest_loc, DBMS_LOB.LOB_READWRITE);
    DBMS_LOB.LOADFROMFILE(
    dest_lob => dest_loc
    ,src_lob => src_loc
    ,amount => DBMS_LOB.getLength(src_loc));
    DBMS_LOB.CLOSE(dest_loc);
    DBMS_LOB.CLOSE(src_loc);
    COMMIT;
    end;
    show errors;
    exec Load_BLOB_From_File('test.pdf');
    exec ctx_ddl.create_preference('mylex','BASIC_LEXER');
    create index testx on test(docs) indextype is ctxsys.context
    parameters
    ('filter ctxsys.AUTO_FILTER LEXER mylex ');
    select id from test where contains(docs,'patch')>0;
    Thanks Roger once more

  • How to store entire files in a oracle 7 database

    How can i store entire files for example image files in a oracle 7 databese. Does is support LOB??

    How can i store entire files for example image files in a oracle 7 databese. Does is support LOB??Hi there,
    to be short: yes you can.
    I actually did it myself, but there a several problems to tacle first:
    - Use LONG RAW as datatyp
    - you can have only one column in a table with LONG RAW
    - consider the overall amount of space used in the database
    - adjust the size of the rollbacksegments.
    Have fun
    Rolf

  • How to store pdf files in application layer

    Hi friends,
    Can any body tell me how to this.when ever we give a print a spool number will be created.we can give this spool number to rstxpdft4 program and we can convert it into pdf.
    how to put this pdf into application layer as a unix file.is it possible to do that.
    Regards,
    Sasi

    Complete code right from spool request :
    FORM convert_spool_to_pdf.
      IF is_otf IS INITIAL .
    List to PDF
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid              = p_spool
               dst_device               = 'LOCL'
             IMPORTING
                  pdf_bytecount            = bytes
                  pdf_spoolid              = pdf_spool
                  list_pagecount           = pages
                  btc_jobname              = job_pdf
                  btc_jobcount             = jobcount_pdf
             TABLES
                  pdf                      = i_pdf
             EXCEPTIONS
                  err_no_abap_spooljob     = 1
                  err_no_spooljob          = 2
                  err_no_permission        = 3
                  err_conv_not_possible    = 4
                  err_bad_destdevice       = 5
                  user_cancelled           = 6
                  err_spoolerror           = 7
                  err_temseerror           = 8
                  err_btcjob_open_failed   = 9
                  err_btcjob_submit_failed = 10
                  err_btcjob_close_failed  = 11.
      ELSE .
    OTF ( SAPSCRIPT ) To PDF
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid              = p_spool
                  no_dialog                = ' '
             IMPORTING
                  pdf_bytecount            = bytes
                  pdf_spoolid              = pdf_spool
                  otf_pagecount            = pages
                  btc_jobname              = job_pdf
                  btc_jobcount             = jobcount_pdf
             TABLES
                  pdf                      = i_pdf
             EXCEPTIONS
                  err_no_otf_spooljob      = 1
                  err_no_spooljob          = 2
                  err_no_permission        = 3
                  err_conv_not_possible    = 4
                  err_bad_dstdevice        = 5
                  user_cancelled           = 6
                  err_spoolerror           = 7
                  err_temseerror           = 8
                  err_btcjob_open_failed   = 9
                  err_btcjob_submit_failed = 10
                  err_btcjob_close_failed  = 11.
      ENDIF .
      IF sy-subrc <> 0 OR
         i_pdf[] IS INITIAL .
    Error creating PDF File .
        Message e000.
      ELSE .
    Got PDF Structure . Now transfer to App. Server.
      ENDIF .
    ENDFORM.                    " convert_spool_to_pdf
    FORM send_spool_app.
      OPEN DATASET p_fname FOR OUTPUT IN BINARY MODE .
      IF sy-subrc = 0.
        LOOP AT i_pdf .
          TRANSFER i_pdf TO p_fname.
        ENDLOOP.
        CLOSE DATASET p_fname .
        MESSAGE s000 WITH p_fname.
      ELSE.
        MESSAGE e502(0u) WITH p_fname .
      ENDIF.
    endform.
    This is a working code as we are using the same concept.
    Hope it helped.

  • How to extract PDF files into the directory the PDF file is located in.

    I use Adobe Acrobat to extract all the pages within a single PDF file to single page PDF files.  However the steps are long, as the path to a directory where i wish to extract is thru the net work and the default location for Adobe is to my C:Drive... So I have to Browse the path to extract to Which can be between 10 and 15 steps depending on the job folders.  Most programs when you extract, the default path is usually where the file location is, with an option to change the path.. makes sense and is very easy.
    So without making a short cut(because the path constantly changes depending on the jobs).  How do I extract directly to the folder that the PDF file is in?   Example, when you extract a zip file, its default location is right there where the zip file is in. Quite simple and logical.

    Thanks Gilad, but that does not make the task easier.  The path always changes as the files are being organized into folders.  Its kind of sad that $400 software can't do what most free ware can do.  Extract itself into the folder it is sitting in.

  • PDF Reader for IPAD 2: how to import PDF files in the library

    I have installed the "PDF reader" app and it is a great one. but can't import pdf files that are already in my IPAD (I see them in iBooks)

    Documents associated with a specific app, such as iBooks, are not available to other apps on the iPad unless the app that they are associated with is capable of sending docs to be opened in another app, such as GoodReader is capable of doing. iOS is a much less open system than a computer OS like MAC OS  X or Windows, there is no central documents folder which various apps can browse to and open.

Maybe you are looking for

  • How will the plant and storage location be determined automatically in PO

    Hi, In ME21n, I have entered Vendor, Material and Qty; also the info record is maintained. Now if I save the PO, the plant and Sloc should be auto determined. Where will I have to maintain this information. In master data the net SLOC for EP is maint

  • DVD rejected for replication

    I created a small, simple DVD using DVDSP 3.0.2 and my client sent it for replication. The replicators rejected my DVD for mastering and sent this snotty email: "Master rejected due to video manager IFO and BUP files in the same ECC block, attach is

  • 1.1.2 NOT released for U.S, Yet?

    It seems that  has yet to post 1.1.2 in the U.S. via iTunes. There is a link that is going around where you can do a forced update. Can someone confirm this information is correct? For myself, I think it is safer just to wait for  to push it to iTu

  • Macbook Pro shuts down intermittently and kernel_task running at 300% constantly

    I've bought a refurbished 13" Macbook Pro (early 2011, Mac OS X Lion 10.7.3) last month and it was working fine all along until yesterday, when the MBP decides to shut itself down while I was surfing the web through Safari and that's why my problem b

  • Installing Win 98 wit KT3 Ultra

    Trying to get Win 98 to install with to following: KT3 Ultra 6380E IBM Deskstar 120G AIB 512MB PC2700 333mhz Nvidia GeForce 3 64MB Artec ACD 56x CD-ROM I get to the widows 98 set up screen to continue and I receive  an application error/general fault