Retrieve document into a blob

Hi Friends,
Can anyone please give me a method e.g my_get_blob(filename) to retrieve a document filename into a blob, i need to upload into the content repository document table of oracle application server portal 10g release (10.1.3)

Portal doesn't support the blob or clog data type. We had to use HTMLDB (application express) to resolve that issue. HTMLDB is really a great product and has allowed us to do so much more in the way of data upload and retrieval for our company end-users.

Similar Messages

  • How do I create and download an XML document and insert this into a BLOB

    I need to create an XMLDOM document and download this onto a users PC. Any ideas about how to do this?
    I would prefer to first insert this into a Table (into a BLOB) to allow users to download it later.
    I can create an XMLDOM document, I can upload a file into wwv_flow_files and then download this later.
    Any suggestion would be appreciated.

    Douglas,
    did you manage to solve this, I am trying to upload an xml file from a page item into the database using a custom pl/sql insert but it won't insert.
    Andrew

  • Inserting a MS Word document into database

    Hello friends at www.oracle.com,
    we need to insert contents from our Microsoft Word documents into an Oracle database. That is, we need to create a Forms program where we can open and select a MS Word file, and insert its contents into a table; for example, MS_DOCUMENTS.
    Thanks, and best regards,
    Franklin Gonçalves Jr.

    Hello Duncan,
    If this is on the web then WebUtil provides
    everything you need. If it's on Client Server you
    can use the OLE Container item type. no, it's not on the Web.
    I want to insert Word documents that are in my directories into database, and I've read that it can be done via BLOB table columns.
    I'd like to insert these documents and retrieve them later. Could you please tell me something about it?
    Sincere thanks for your help.
    Best regards,
    Franklin Goncalves Jr.

  • How can i retrieve documents(.doc,.pdf, .txt) using forms from the database.

    How can i retrieve documents(e.g .doc,.pdf, .txt etc) using forms from the database.
    i inserted the documents using sql*loader, below is the control and data files.
    -- control file
    LOAD DATA
    infile 'load.txt'
    INTO TABLE husman
    APPEND
    FIELDS TERMINATED BY ','
    (id integer external,
    fname FILLER CHAR(50),
    docu LOBFILE(fname) TERMINATED BY EOF)
    --data file
    1,../husman/dell.doc,
    2,../husman/me.pdf,
    3,../husman/export.txt,
    in the form i have a text field to display the id and an OLE container to display the document as an icon. but when i execute query, i only get the id number and not the document.
    any help will be appreciated.
    Thanks
    Hussein Saiger

    Step by step
    1. Erase all contents and settings
    2. You'll be asked twice to confirm
    3. You'll see Apple logo and progress bar
    4. You'll see a big iPad logo on screen
    5. Configuration start
    6. Set language
    7. Set country
    8. Enable Location Service
    9. Select network, enter password and join network
    10. You'll be given 3 options (a) Setup as New iPad (b) Restore from iCloud Backup (c) Restore from iTune Backup
    11. Selected Restore from iCloud Backup
    12. You'll be required to enter Apple ID and Password
    13. Agree to Terms and Conditions
    14. Select Backup file
    15. You'll see progress bar
    16. Red slider will appear; slide to unlock; step #1 to #16 is fast
    17. Pre-installed apps will be restored first
    18. Message: Purchased apps and media will now be automatically downloaded
    19. You'll see a pageful of apps with Waiting/Loading/Installing
    20. Message: Some apps cannot be downloaded, please sync with computer

  • Timeout when retrieving document from Content Server

    Dear experts,
    after the migration of an R/3 Enterprise system with a file-based Content Server (CS without database) we experience significant delays when a document shall be retrieved from the Content Server and displayed.
    The repository, from which documents are retrieved, has the following properties:
    Document Area = ArchiveLink
    Storage Type = HTTP content server
    Obviously the delay is caused by time-outs when R/3 tries to access the content sever.
    The RFC trace recorded during the document retrieval contains the following entries:
    Trace file opened at 20100825 104048 CEST SAP-REL 640,0,304 RFC-VER 3
    Trace file opened at 20100825 104115 CEST SAP-REL 640,0,304 RFC-VER 3
    End of trace *****
    ======> CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456
    Timeout beim Verbindungsaufbau (Partner vorhanden ?)
    ABAP Programm: SAPLSCMS_CLTFC (Transaction: )
    Called function module: RFC_PING
    User: TSI0403 (Client: 007)
    Destination: SAPCMS (handle: 4, , {4C74C1A6-BD3B-3B59-E100-00001A5F0A18})
    SERVER> RFC Server Session (handle: 1, 41571399, {4C74D031-BD2C-3B58-E100-00001A5F0A18})
    SERVER> Caller host: cimpd38_MPD_38
    SERVER> Caller transaction code: MIR4 (Caller Program: CL_GOS_TOOLBOX_VIEW===========CP)
    SERVER> Called function module: GOS_EXECUTE_SERVICE
    Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 3268
    CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456
    Timeout beim Verbindungsaufbau (Partner vorhanden ?)
    Error RFCIO_ERROR_MESSAGE in abrfcio.c : 1660
    ======> CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456
    Timeout beim Verbindungsaufbau (Partner vorhanden ?)
    ABAP Programm: SAPLSCMS_FE_RFC (Transaction: )
    Called function module: RFC_PING
    User: TSI0403 (Client: 007)
    Destination: SAPHTTP (handle: 6, , {4C74C1B4-BD3B-3B59-E100-00001A5F0A18})
    SERVER> RFC Server Session (handle: 1, 41571399, {4C74D031-BD2C-3B58-E100-00001A5F0A18})
    SERVER> Caller host: cimpd38_MPD_38
    SERVER> Caller transaction code: MIR4 (Caller Program: CL_GOS_TOOLBOX_VIEW===========CP)
    SERVER> Called function module: GOS_EXECUTE_SERVICE
    Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 3268
    CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456
    Timeout beim Verbindungsaufbau (Partner vorhanden ?)
    Error RFCIO_ERROR_MESSAGE in abrfcio.c : 1660
    I wonder why R/3 first attempts to contact the Content Server via the SAPCMS RFC destination rather than using HTTP (SAPHTTP)? - The connection tests for both RFC connections are successful.
    Is there a way to instruct R/3 to go via the SAPHTTP RFC destination as the first choice and NOT via SAPCMS when documents shall be retrieved and displayed?
    Thank you,
    Rainer Walter
    Edited by: Rainer Walter on Sep 3, 2010 3:07 PM

    Hi Ravindra,
    thank you for looking into this problem. The Content Server is not based on SAP DB/MaxDB. The repositories are represented as plain directory structures in a file system.
    My issue is that R/3 is not using the SAPHTTP RFC connection as first choice although the repository is flagged as "HTTP Content Server" but uses another RFC destination instead. When this attempt is timed out, R/3 eventually picks the appropriate RFC destination. So it takes a considerable amount of time until a requested document is finally retrieved from the repository in the Content Server.
    I am confused because the system where I experience this behaviour has been built from a system copy of a production system, and the Content Server for this new system has been built from scratch. In the original production system, no timeout is found when users are retrieving documents, and obviously the original R/3 system is using SAPHTTP right away. The original production system and the new system built from a system copy are accessing different Content Servers.
    I am looking for a way to instruct the new R/3 system to immediately use the SAPHTTP connection when talking to the Content Server, and I would be grateful for a hint where I can configure this to get rid of these timeouts.
    Best regards,
    Rainer

  • Inserting Hashtable into a BLOB column..

    Hi,
    Iam trying to store a hashtable object into a BLOB column..when i try to retrieve
    from hte blob column i get the following exception
    StreamCorruptedException:out of range is 0

    I could insert into database successfully,while retrieving I got this exception.
    I could able to insert and retrieve anyother java objects except Hashtable and
    HashMap...
    also I tried putting Hasttable into a Vector..that also didn'
    t work.
    thanks in advance.
    Muthu
    public void conn(){
    ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
              try {
                   ctx = new InitialContext(ht);
                   javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("WorkFlowDataSource");
                   java.sql.Connection connection = ds.getConnection();
              connection.setAutoCommit(false);
              Statement statement = connection.createStatement();
              rs = statement.executeQuery("select blob_data from test for update");
              while (rs.next()) {
                        myRegularBlob = rs.getBlob("blob_data");
              OutputStream os = ((weblogic.jdbc.common.OracleBlob)myRegularBlob).getBinaryOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(os);
              Hashtable hash = new Hashtable();
              hash.put("1","111111111hgfdhgkdkvalue");
              oos.writeObject(hash);
              oos.flush();
              connection.commit();
              System.out.println("Object inserted into persistence..");
              rs.close();
              statement.close();
              } catch(Exception ex){
                   ex.printStackTrace();
              retrieve();
              public void retrieve(){
              try {
                        ctx = new InitialContext(ht);
                        javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("WorkFlowDataSource");
                        java.sql.Connection connection = ds.getConnection();
                        Statement statement = connection.createStatement();
                        rs = statement.executeQuery("select blob_data from test ");
              while (rs.next()) {
              myRegularBlob = rs.getBlob("blob_data");
              ObjectInputStream oos1 = new ObjectInputStream(os1);
              Hashtable sections = (Hashtable)oos1.readObject();
              System.out.println("Obj retrieved..\n"+sections);
              statement.close();
              rs.close();
              connection.close();
         } catch(Exception ex){
              ex.printStackTrace();
    "Slava Imeshev" <[email protected]> wrote:
    Muthu,
    could you show us how you write/read the hashtable?
    Regards,
    Slava Imeshev
    "Muthu" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    Iam trying to store a hashtable object into a BLOB column..when i tryto
    retrieve
    from hte blob column i get the following exception
    StreamCorruptedException:out of range is 0

  • How can I import an XML DOM document into another?

    Dear all,
    I'm using the following bit of code:
         public static Node replaceNode(Document replacedDocument,
                        Document replacingDocument,
                        Node replacedNode)
         //Create a documentFragment of the replacingDocument
         DocumentFragment docFrag = replacingDocument.createDocumentFragment();
         Element rootElement = replacingDocument.getDocumentElement();
         docFrag.appendChild(rootElement);     
         //Import docFrag under the ownership of replacedDocument
         Node replacingNode =
         ((replacedDocument).importNode(docFrag, true));
              //In order to replace the node need to retrieve replacedNode's parent
         Node replaceNodeParent = replacedNode.getParentNode();
         replaceNodeParent.replaceChild(replacingNode, replacedNode);
         return replacedDocument;
    to import a DOM document into another DOM document, so that it converts something like this:
    <?xml= .... etc>
    <Data></Data
    to:
    <?xml= .... etc>
    <Data>
    <Yellow>Butter</Yellow>
    <White>Marzipan</White>
    </Data>
    Instead, what it is doing is:
    <?xml= .... etc>
    <Yellow>Butter</Yellow>
    <White>Marzipan</White>
    I know that it is stripping out the <Data> elements because of the call to the replaceChild
    function, after getting the element's parent, but if I change
    Node replaceNodeParent = replacedNode.getParentNode();
    to
    Node replaceNodeParent = replacedNode;
    I get an error about node node being accessible.
    Please help!
    Paul

    http://forum.java.sun.com/thread.jsp?forum=34&thread=208596

  • Concatenate multiple word documents into 1 long document in APEX

    I have a requirement to concatenate multiple word documents into 1 long document in APEX but I'm not sure if it can be done
    or where to begin.
    I've been able to upload/download files in APEX and generate Word docs using BI Publisher, but I can't seem to find anyway to carryout the above.
    Any feedback greatly received.
    Thanks in advance.
    Keith

    Thanks for your reply Jari.
    The files are never actually stored in the database as a BLOB or CLOB.
    I'm basically trying to do the following:-
    I have a third party Document Management System that stores a number of templates (.doc and .dot).
    The files are stored in a directory on a file sever.
    I have been tasked with the job of creating a Document Generator type app in APEX that will allow the users to select a number of these files and concatenate them together into 1 large 'Master' Document.
    I was hoping to be able to do this without having to go down the line of using external software functions like Java but I'll check out your suggestion.
    Cheers
    Keith

  • Retrieving document stored in a variable

    <xsl:variable name="result" select="document('response-new.xml')" />
    will the above code store the content of the document in the variable result?
    If it stores how can we retrieve document from it?
    If it ll not how can we call a document stored in a drive into an xsl?
    Message was edited by:
    Aswathy_tvm

    Hi tvm..
    <xsl:variable name="result" select="document('response-new.xml')" />
    Giving this i dont thnk the ur xml document wld be stroed in the variable result.
    regards
    Shanu

  • Indexing multiple documents in one BLOB?

    Hello,
    I need to index a bundle of documents (PDF, DOC, PPT...) as a unit with one index and probably a key identifying the bundle. So that not every document must match the searchstring to be found by the user, but the whole bundle is searched for containing it.
    The usecase is, that I have a bundle of documents that logicaly belong together. These bundles should be searched for a group of words returning the bundle that contains all of these words and not only the document containing all of them. So that, for example, also bundles are found where some words are in one document and the rest in a second one.
    I hope someone's understanding what I mean.

    You can't really put them all into one BLOB colum, it would be pretty hard to work out where one document ended an another started. Instead, I would suggest you put the documents into a separate table, one per row with a "bundlenumber" column representing the links between them. Then have a table with one row per bundle, and create a user datastore which fetches docs from the doc table, filters them using ctx_doc.policy_filter (or ctx_doc.ifilter) and concatenates the filter output.

  • PHP 5 Code to Upload and Retrieve an Image (aka BLOB) with Oracle

    I keep being asked about BLOBs. For posterity, here is my example updated
    to use the new PHP 5 OCI8 function names, and using bind variables for the BLOB id.
    -- cj
    <?php
    // Sample form to upload and insert an image into an ORACLE BLOB
    // column using PHP 5's OCI8 API. 
    // Note: Uses the new PHP 5 names for OCI8 functions.
    // Before running this script, execute these statements in SQL*Plus:
    //   drop table btab;
    //   create table btab (blobid number, blobdata blob);
    // This example uploads an image file and inserts it into a BLOB
    // column.  The image is retrieved back from the column and displayed.
    // Make sure there is no whitespace before "<?php" else the wrong HTTP
    // header will be sent and the image won't display properly.
    // Make sure php.ini's value for upload_max_filesize is large enough
    // for the largest lob to be uploaded.
    // Tested with Zend Core for Oracle 1.3 (i.e. PHP 5.0.5) with Oracle 10.2
    // Based on a sample originally found in
    //     http://www.php.net/manual/en/function.ocinewdescriptor.php
    $myblobid = 1;  // should really be a unique id e.g. a sequence number
    define("ORA_CON_UN", "hr");             // username
    define("ORA_CON_PW", "hr");             // password
    define("ORA_CON_DB", "//localhost/XE"); // connection string
    if (!isset($_FILES['lob_upload'])) {
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"
       enctype="multipart/form-data">
    Image filename: <input type="file" name="lob_upload">
    <input type="submit" value="Upload">
    </form>
    <?php
    else {
      $conn = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
      // Delete any existing BLOB so the query at the bottom
      // displays the new data
      $query = 'DELETE FROM BTAB WHERE BLOBID = :MYBLOBID';
      $stmt = oci_parse ($conn, $query);
      oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
      $e = oci_execute($stmt, OCI_COMMIT_ON_SUCCESS);
      if (!$e) {
        die;
      oci_free_statement($stmt);
      // Insert the BLOB from PHP's tempory upload area
      $lob = oci_new_descriptor($conn, OCI_D_LOB);
      $stmt = oci_parse($conn, 'INSERT INTO BTAB (BLOBID, BLOBDATA) '
             .'VALUES(:MYBLOBID, EMPTY_BLOB()) RETURNING BLOBDATA INTO :BLOBDATA');
      oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
      oci_bind_by_name($stmt, ':BLOBDATA', $lob, -1, OCI_B_BLOB);
      oci_execute($stmt, OCI_DEFAULT);
      // The function $lob->savefile(...) reads from the uploaded file.
      // If the data was already in a PHP variable $myv, the
      // $lob->save($myv) function could be used instead.
      if ($lob->savefile($_FILES['lob_upload']['tmp_name'])) {
        oci_commit($conn);
      else {
        echo "Couldn't upload Blob\n";
      $lob->free();
      oci_free_statement($stmt);
      // Now query the uploaded BLOB and display it
      $query = 'SELECT BLOBDATA FROM BTAB WHERE BLOBID = :MYBLOBID';
      $stmt = oci_parse ($conn, $query);
      oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
      oci_execute($stmt, OCI_DEFAULT);
      $arr = oci_fetch_assoc($stmt);
      $result = $arr['BLOBDATA']->load();
      // If any text (or whitespace!) is printed before this header is sent,
      // the text won't be displayed and the image won't display properly.
      // Comment out this line to see the text and debug such a problem.
      header("Content-type: image/JPEG");
      echo $result;
      oci_free_statement($stmt);
      oci_close($conn); // log off
    ?>

    I am using oracle 10g [10.2.0.1.0] and PHP 4.3.9 with Apache.
    I tried my best to change the old functions names for example(oci_fetch)
    to the new (OCIFetch),i works every where, but i could not find the corresponded functions of (oci_fetch_assoc) that's why i can not see my BLOBS at all!
    Can some help me please, to know where are corresponded functions of oracle 8 to oracle 10g?
    Exactly here is my problem:
    $query = 'SELECT BLOBDATA FROM BTAB WHERE BLOBID = :MYBLOBID';
    $stmt = ociparse ($conn, $query);
    OCIBindByName($stmt, ':MYBLOBID', $myblobid);
    ociexecute($stmt, OCIDEFAULT);
    $arr = oci_fetch_assoc($stmt);
    // OCIFetchAssoc, OCIFetch, OCI_ASSOC ... nothing works-> Fatal error: Call to undefined function:
    $result = $arr['BLOBDATA']->load();
    What should i do?
    Thanky very much.

  • Converting Terminal Document Into AIFF

    Hi,
    I recently retrieved some data off of some some very old PowerMac computers, including some audio files. When viewed in OS X, these files are simply labled as Terminal Documents. Is there a way that I can convert the Terminal Documents into an audio file like AIFF?
    Thanks

    if you are sure of the file type, just add the appropriate extension: e.g. if the file is called "teletubby" and you know it's an AIFF file, select it in the finder and change the name to "teletubby.aiff".  that will give it the proper icon and file associations.  If you need to do it in bulk it's easy to do in applescript - google 'applescript rename files' for pointers.

  • Problems while uploading text documents into Unicode Database

    I just upgraded our database from 9iR1 to 9iR2 (9.2.0.1.0). The server
    character set is AL32UTF8. Now I'm facing a problem when
    uploading text documents into the database via a web frontend.
    I use the upload table defined for the PL/SQL Database Access Descriptor:
    create table TB_UPLOAD (
    NAME VARCHAR2(256) not null,
    MIME_TYPE VARCHAR2(128),
    DOC_SIZE NUMBER,
    DAD_CHARSET VARCHAR2(128),
    LAST_UPDATED DATE,
    CONTENT_TYPE VARCHAR2(128),
    BLOB_CONTENT BLOB);
    After uploading a text document containing the two words "hallo welt",
    the following statement returns not "hallo welt", but "68616C6C6F2077656C74":
    declare
    b_loc blob;
    v_amount integer := 100;
    v_buffer varchar2(100);
    v_offset integer := 1;
    begin
    select blob_content into b_loc from tb_upload where name like 'mydoc.txt';
    dbms_lob.read(b_loc, v_amount, v_offset, v_buffer);
    htp.prn(v_buffer);
    end;
    What is this? I studied the documentation, but didn't found a solution.
    When trying to use Oracle's built-in procedure wpg_docload.download_file,
    the content is shown the way it should be. Unfortunately, I can't use
    wpg_docload.download_file in order to copy the BLOB content to another table.
    Any hints would be appreciated!
    Thanks so much in advance!
    Roman
    E-Mail: [email protected]

    Hi Roman,
    the upload uses a BLOB (Binary Lob). Your Document is
    stored as is in the binary representation. If you
    use dbms_lob.read on a blob and your buffer is a varchar2 the binary representation is not translated!!!
    use a raw for the buffer and utl_raw.cast_to_varchar2
    to do the conversion to varchar.
    try this
    Procedure SHOW_DOC(p_name doc_test.name%TYPE)
    IS
    v_len number;
    v_mime_type tb_upload.mime_type%TYPE;
    v_offset integer := 1;
    v_Buf_size integer := 32767;
    v_buf raw(32767);
    v_blob blob;
    v_Doc_name varchar2(1000);
    BEGIN
    v_doc_name := url_Decode(p_name);
    select mime_type,doc_size,blob_content
    into v_mime_Type,v_len,v_blob
    from tb_upload
    where name = v_doc_name;
    OWA_UTIL.MIME_HEADER(v_Mime_Type);
    begin
    LOOP
    DBMS_LOB.READ(v_blob,v_buf_size,v_offset,v_buf);
    HTP.PRN(UTL_RAW.CAST_TO_VARCHAR2(v_buf));
    v_offset := v_offset + v_buf_size;
    END LOOP;
    exception
    when no_data_found then
    null;
    end;
    END;
    HTH
    detlev

  • Problems while uploading text documents into Database

    I just upgraded our database from 9iR1 to 9iR2 (9.2.0.1.0). The server
    character set is AL32UTF8. Now I'm facing a problem when
    uploading text documents into the database via a web frontend.
    I use the upload table defined for the PL/SQL Database Access Descriptor:
    create table TB_UPLOAD (
    NAME VARCHAR2(256) not null,
    MIME_TYPE VARCHAR2(128),
    DOC_SIZE NUMBER,
    DAD_CHARSET VARCHAR2(128),
    LAST_UPDATED DATE,
    CONTENT_TYPE VARCHAR2(128),
    BLOB_CONTENT BLOB);
    After uploading a text document containing the two words "hallo welt",
    the following statement returns not "hallo welt", but "68616C6C6F2077656C74":
    declare
    b_loc blob;
    v_amount integer := 100;
    v_buffer varchar2(100);
    v_offset integer := 1;
    begin
    select blob_content into b_loc from tb_upload where name like 'mydoc.txt';
    dbms_lob.read(b_loc, v_amount, v_offset, v_buffer);
    htp.prn(v_buffer);
    end;
    What is this? I studied the documentation, but didn't found a solution.
    When trying to use Oracle's built-in procedure wpg_docload.download_file,
    the content is shown the way it should be. Unfortunately, I can't use
    wpg_docload.download_file in order to copy the BLOB content to another table.
    Any hints would be appreciated!
    Thanks so much in advance!
    Roman
    E-Mail: [email protected]

    Hi Roman,
    the upload uses a BLOB (Binary Lob). Your Document is
    stored as is in the binary representation. If you
    use dbms_lob.read on a blob and your buffer is a varchar2 the binary representation is not translated!!!
    use a raw for the buffer and utl_raw.cast_to_varchar2
    to do the conversion to varchar.
    try this
    Procedure SHOW_DOC(p_name doc_test.name%TYPE)
    IS
    v_len number;
    v_mime_type tb_upload.mime_type%TYPE;
    v_offset integer := 1;
    v_Buf_size integer := 32767;
    v_buf raw(32767);
    v_blob blob;
    v_Doc_name varchar2(1000);
    BEGIN
    v_doc_name := url_Decode(p_name);
    select mime_type,doc_size,blob_content
    into v_mime_Type,v_len,v_blob
    from tb_upload
    where name = v_doc_name;
    OWA_UTIL.MIME_HEADER(v_Mime_Type);
    begin
    LOOP
    DBMS_LOB.READ(v_blob,v_buf_size,v_offset,v_buf);
    HTP.PRN(UTL_RAW.CAST_TO_VARCHAR2(v_buf));
    v_offset := v_offset + v_buf_size;
    END LOOP;
    exception
    when no_data_found then
    null;
    end;
    END;
    HTH
    detlev

  • Inserting Notepad.TXT document into JTextArea(Document) ???

    Hi.
    I've a JTextArea and I would like to insert a notepad.txt document into it for display only ie. the user is not allowed to edit it. Before I hurdle down a particular path, should I be using getDocumentBase() for this purpose?
    Following is the stub code where I intend to pick up the notepad.txt document (and it would be even better to have formatted text instead of plain text):
    public class ExplanatoryText extends JFrame {
      Image picture;
      Document AboutCredit;
      Font txtFont = new Font("Monospaced", Font.PLAIN,11);
      public ExplanatoryText()
        JFrame f = new JFrame("Explanatory Note : About Credit");
        f.setSize(800,200);
        f.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        Container content = f.getContentPane();
        content.setBackground(Color.white);
        content.setLayout(new FlowLayout());
        // add the LoC description inside a scrollable area
        // use getDocumentBase() to retrieve a notepad.txt document (around 2-3k)
        AboutCredit = new PlainDocument();
        JTextArea explainTxt = new JTextArea(AboutCredit);
        explainTxt.setFont(txtFont);
        explainTxt.setMargin(new Insets(5,5,5,5));
        JScrollPane scrollpanel = new JScrollPane(explainTxt);
        scrollpanel.setPreferredSize(new Dimension(550,480));
        content.add(scrollpanel, BorderLayout.CENTER);
        f.setVisible(true);
      }// end of method ExplanatoryText
    }// end of class ExplanatoryTextYIA :-)

    Hi. Thank-you for taking time to look at my issue.
    Indeed there are many ways of doing it if it weren't an applet. If it were a simple Java program, I would simply use an io-stream, like this :
    public class ExplanatoryText extends JFrame {
      Font txtFont = new Font("Monospaced", Font.PLAIN,11);
      public ExplanatoryText(String fileName, String headerTxt) throws IOException
        JFrame f = new JFrame("Explanatory Note : " + headerTxt);
        f.setSize(800,200);
        f.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        Container content = f.getContentPane();
        content.setBackground(Color.white);
        content.setLayout(new FlowLayout());
        File inputFile = new File(fileName);
        Reader readTxt = new FileReader(inputFile);
        JTextArea txtArea = new JTextArea();
        txtArea.read(readTxt,null);
        txtArea.setFont(txtFont);
        txtArea.setMargin(new Insets(5,5,5,5));
        JScrollPane scrollpanel = new JScrollPane(txtArea);
        scrollpanel.setPreferredSize(new Dimension(250,380));
        content.add(scrollpanel, BorderLayout.CENTER);
        f.setVisible(true);
      }// end of method ExplanatoryText
    }// end of class ExplanatoryTextBut since it is an applet, it has run into the typical "Access Denied" problem when trying to read the input file from the locally mounted volumn.
    Hence my question about whether using getDocumentBase and PlainDocument would be easier.
    Thanks again for your input.

Maybe you are looking for

  • Dynamic Actions with Multiple Actions Capability

    Dynamic Actions with Multiple Actions Capability How can I get Dynamic Actions to work on Actions that are stored solely on IT0302 due to the multiple relationship to a previous Action that is stored on both IT0302 and IT0000? When multiple actions o

  • How to sync BC4J entity changes across sessions?

    Hi, In my application, I have two ADF faces pages to manipulate a database table. For example, the table is: Schedule(TimeFrom,TimeTo,Description) For the scheduleDisplay.jspx, it displays all schedules in a table. For the scheduleEdit.jspx, it shows

  • Purchase Req For STO -In Third Party Scenario

    Hi gurus, Is it possible if i create a sales order a purchase requisition should be genarated. the normal third party PR we can not convert in to STO and account assignment catagory "M" is coming in PR but in case of STO Pur req. that is not require.

  • How Do I roll-back to Version 6.0.5?

    iTunes 7 is despicable. It crashes on me every other minute, and has to go. I tried rolling back to Version 6.0.5, but now I get a message that reads: The file "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes. I

  • How can I turn off Mixed Content Blocking via script for an enterprise?

    Users in our enterprise (2,000+ clients) have to manually allow an MCB exception when using an in-house application every time we use it. I have exported the registry, made the change to mixed content blocking active content in about:config, and then