7 Replies Latest reply on May 16, 2013 11:20 AM by François Degrelle

    Displaying the BLOB files(PDF,TXT,IMAGE,etc) in the Form as an Attachment

      Hi all,

      I need to Open a file which is stored in the Data base Table & the Data type is of BLOB so i am populating the data but i need to display the attachment which is stored in the BLOB file when the button is clicked & i am using Oracle 10g

      I have been just placed a Button & written the below code in WHEN_BUTTON_PRESSED Trigger & i have tried it out by placing a image icon & WHEN_IMAGE_PRESSED but it's not getting worked

      It is Directly Coming in to Exception..


      vblob BLOB;
      vmime VARCHAR2(30);

      select attachment,MIME_TYPE into vblob,vmime
      from Table_name_a
      where UNIQUE_ID = 16842;--:ITEM_RESULT.DRAWINGNO;

      owa_util.mime_header( vmime, false);
      -- owa_util.mime_header( 'image/jpeg', false);
      -- owa_util.mime_header( 'image/jfif', false);
      -- owa_util.mime_header( 'image/gif', false);
      -- owa_util.mime_header( 'application/word' , FALSE);-- to read MS WORD doc
      owa_util.mime_header( 'application/pdf' , FALSE);-- to read ADObE

      message ('attachment type is' ||vmime);
      message ('attachment type is' ||vmime);

      when no_data_found then
      dbms_output.put_line('1. attachment type is' ||vmime);
      -- NULL;

      so if any body has any idea Please let me Know

      Hope for the Reply.

      Thanks & Regards
      K Nikethan Reddy