Open word file, stored in database through Forms.

Assalam-o-Alikum
to Genius of Oracle's
I have stored the Word file name "MY_FILE.DOC" in oracle database. Now i want to open the file through Forms, remember i am using forms 6i. is there any body who help me to open the file.
Best Regards
Farrukh Shaikh

Assalam-o-Alikum
My in tension was not to hurt any body. if it did then sorry for that.
here is the code through which i stored the file in database
first create the DIRECTORY CREATE DIRECTORY generic AS 'C:\temp';---- --directory path where your files will be searched for storing.
THEN
create table my_blob_table
pk_name varchar2(20) primary key,
pk_value varchar2(20),
col_document blob
INSERT INTO MY_BLOB_TABLE
(PK_NAME,PK_VALUE)
('A','A');
COMMIT;
CREATE OR REPLACE PROCEDURE load_blob_from_file
( src_file_name IN VARCHAR2
, table_name IN VARCHAR2
, column_name IN VARCHAR2
, primary_key_name IN VARCHAR2
, primary_key_value IN VARCHAR2 ) IS
-- Define local variables for DBMS_LOB.LOADBLOBFROMFILE procedure.
des_blob BLOB;
src_blob BFILE := BFILENAME('GENERIC',src_file_name);
des_offset NUMBER := 1;
src_offset NUMBER := 1;
-- Define a pre-reading size.
src_blob_size NUMBER;
-- Define local variable for Native Dynamic SQL.
stmt VARCHAR2(2000);
BEGIN
-- Opening source file is a mandatory operation.
IF dbms_lob.fileexists(src_blob) = 1 AND NOT dbms_lob.isopen(src_blob) = 1 THEN
src_blob_size := dbms_lob.getlength(src_blob);
dbms_lob.open(src_blob,DBMS_LOB.LOB_READONLY);
278 Oracle Database 11g PL/SQL Programming
END IF;
-- Assign dynamic string to statement.
stmt := 'UPDATE '||table_name||' '
|| 'SET '||column_name||' = empty_blob() '
|| 'WHERE '||primary_key_name||' = '||''''||primary_key_value||''' '
|| 'RETURNING '||column_name||' INTO :locator';
-- Run dynamic statement.
EXECUTE IMMEDIATE stmt USING OUT des_blob;
-- Read and write file to BLOB.
dbms_lob.loadblobfromfile( dest_lob => des_blob
, src_bfile => src_blob
, amount => dbms_lob.getlength(src_blob)
, dest_offset => des_offset
, src_offset => src_offset );
-- Close open source file.
dbms_lob.close(src_blob);
-- Commit write.
IF src_blob_size = dbms_lob.getlength(des_blob) THEN
$IF $$DEBUG = 1 $THEN
dbms_output.put_line('Success!');
$END
COMMIT;
ELSE
$IF $$DEBUG = 1 $THEN
dbms_output.put_line('Failure.');
$END
RAISE dbms_lob.operation_failed;
END IF;
END load_blob_from_file;
after create the PROCEDURE run the procedure
begin
load_blob_from_file('FILE_NAME.DOC',' my_blob_table','col_document','PK_NAME','A');
end;

Similar Messages

  • Store and display word document in database through forms

    how can i store a word document in database through forms 6i or 10g, and display it through forms from database.
    i know how to store a binary file in database through DBMS_LOB package, but i want to do it throug forms. is it possible?
    regards

    Hi Alex
    "Create a datablock and specify the item datatype as blob"
    BUT: How to bring the document to the blob?
    Hi user 611..
    Warning: It is easy if you use an OLE-Object - but OLE is a special format. The result will not be the same as with dbms_LOB.
    We have a application with documents stored via OLE - terrible!
    OLE is no longer supported by forms 10. But webutil would help.
    I asked a similar question and got a good answer:
    OLE-Container and migration to the web
    Wolfram

  • Access forms File stored in database

    Can any body help in this
    Call_Form('i:\test\fmb\entgrp');
    here entgrp is the FMX file stored in Server which is mapped to i:
    1 Now if i want to use this call_form
    to call the file stored in database what is the syntax
    2 and How to invoke this file from desktop using f45run
    3 The File Stored in Databse like this is fmb or fmx
    Thanks in Advance

    When you save a Form to the database it is the FMB that you save and not the FMX. So you'll need to have the FMX on a file system and call it from there.
    f45run recieves parameters such as userid=scott/tiger module=a.fmx
    Check out the help to see the full list.
    (P.S. Isn't it time you upgraded to a newer version of Forms?)

  • Store and Display doc/pdf files in the database using Forms

    Hi all,
    How can i store and display doc/pdf files in the database using Forms 10g?.
    Arif

    How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
    Solution
    Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
    here are steps to get a small test form running, using WebUtil 1.06.
    Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
    Feel free to copy this note to a text editor, and do a global find/replace on
    [OraHome] with your actual value (no trailing slash). Then it is easy to
    copy/paste actual commands to be executed from the note copy.
    1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
      and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
    2) Copy or move jacob.jar and jacob.dll
      [JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
         cd [JacobStage]
         copy jacob.jar [OraHome]\forms\java\.
         copy jacob.dll [OraHome]\forms\webutil\.
      The Jacob staging area is no longer needed, and may be deleted.
    3) Sign frmwebutil.jar and jacob.jar
      Open a DOS command prompt.
      Add [OraHome]\jdk\bin to the PATH:
         set PATH=[OraHome]\jdk\bin;%PATH%
      Sign the files, and check the output for success:
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
    4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
      you may skip this step. Otherwise,
      Create a schema to hold the WebUtil stored code, and privileges needed to
      connect and create a stored package. Schema name "WEBUTIL" is recommended
      for no reason other than consistency over the user base.
      Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
      out the EXIT statement, to be able to see whether the objects were created witout
      errors.
      Start SQL*Plus as SYSTEM, and issue:
         CREATE USER webutil IDENTIFIED BY [password]
         DEFAULT TABLESPACE users
         TEMPORARY TABLESPACE temp;
         GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
         CONNECT webutil/[password]@[connectstring]
         @[OraHome]\forms\create_webutil_db.sql
         -- Inspect SQL*Plus output for errors, and then
         CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
      Reconnect as SYSTEM, and issue:
         grant execute on webutil_db to public;
    5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
      to the CLASSPATH entry.
    6) Start the OC4J instance
    7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
      Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
      It is important to generate the PLX, to avoid the FRM-40039 discussed in
      Note 303682.1
      If the PLX is not generated, the Webutil.pll library would have to be attached with
      full path information to all forms wishing to use WebUtil. This is NOT recommended.
    8) Create a new FMB.
      Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
      There is no need to Subclass the WebutilConfig object.
      Attach the Webutil.pll Library, and remove the path.
      Add an ON-LOGON trigger with the code
             NULL;
      to avoid having to connect to an RDBMS (optional).
      Create a new button on a new canvas, with the code
             show_webutil_information (TRUE);
      in a WHEN-BUTTON-PRESSED trigger.
      Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
    9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
      the "Application Server URL" is empty.
      Then append "?config=webutil" at the end, so you end up with a URL of the form
          http://server:port/forms/frmservlet?config=webutil
    10) Run your form.sarah

  • Jsp page opening pdf file stored in an ORDDOC type column

    Dear All,
    i am building a jsp page that opens a pdf file stored in database. if column type is BLOB, i run the prepareStatement and store in a ResultSet, and then BufferedInputStream(result.getBinaryStream("FILE")). it works. page opens the pdf file.
    but when column type is ORDDOC, i get this error:
    Failure in java.sql.SQLException: Ongeldig kolomtype.: getBinaryStream not implemented for class oracle.jdbc.driver.T4CNamedTypeAccessor
    what more do i do to get a pdf(or txt, msword..) file to jsp page and open it?
    regards
    Jerry

    We are facing this problem with IE6 browser only. In firefox, it opens fine in a browser window. What configuration should we do in IE6?
    Thanks,
    Ananth.

  • Can't open word files sent from my 9500 to E90

    Can some one please help me,
    word documents sent to my E90 from my 9500 won't open,
    message says :Unable to open file not supported,
    It all started with data mover, Contact & Calendar entries are fine but document folders are recognised but won't open,
    Nokia suggested using drag & drop, using Pc suit
    with the 9500 connected drag all wanted files from the phone into my Pc then connect the E90 and reverse the process, files appear but I can't open them,
    Then I was told to e-mail from my Pc as an attachment,
    did'nt work either, doesn't matter how you get the files into the E90 you don't seem to be able to open them.
    So, is it possable to get word files into an E90 from a 9500
    Thank you.

    11-Nov-200708:34 PM
    vmoisa wrote:
    Open Word file in 9500, choose "Save as" from the Menu and you will have an option on one of the buttons at the right of the screen regarding the Format. Press that button and choose MS Word format. If you save all your Word files like this you should be able to open them on E90.
    This is from memory alone. If I was not clear enough, please let me know and I will give you more detailed instructions. Good luck.
    Me again, opened and a file in my 9500 and saved it in MS Word 97 then using Pc Suit copied it from one phone into the other, but once again I get the same message (Unable to open.. File type not supported)
    I don't know if all E90's come with the same programs pre-loaded, in mine I have a program entitled Quick Office in which it says you can open and manipulate Word files along with Excel and also Lotus Notes but first you have to purchase and download software from Nokia to activate it,
    I have found that if I go into Quick Office and write a document in word then save it, I get the same message as above when I try to open it,
    As I said in my previous message, I suspect I will have to purchase the Quick Office software from Nokia,
    I look forward to hearing your thoughts,
    Kind Regards.
    As

  • Cannot open Word File because "there are problems with the contents"

    Hi Everyone,
    I cannot open Word File because "there are problems with the contents" unspecified error; Location: 2.  Please help as I need this doc for work meeting this morning.  Nothing special about this doc but links were copied into it???  However I do that all the time.  I have never had this happen before.  I am on a 2010 machine.  I just ran a disk permissions repaired and emptied the trash but still no dice.  I had several other word docs up as well when I got up this morning but they are all fine.  I do not have Time Capsule turned on (which I need to do but that will be another thread/question).
    Thank you,
    sb

    Ok, I found a way to open this but not sure what happened to begin with and the formatting setup is different now, almost like text editor?  Not sure what happened here but hope it doesn't happen again?

  • Since updating my ipad2 with latest software I can't open Word files - reason??

    Since updating my ipad2 with latest software I can't open Word files - reason??

    Try this:
    1. Close all apps in the Task Bar. Double-click the Home button and hold apps down for a second or two. Tap the minus sign to close app.
    2. Hold the Sleep and Home button down until you see the Apple Logo.

  • Displaying a word file stored as BLOB in the database

    Post Author: Sathish K Sekar
    CA Forum: WebIntelligence Reporting
    Hi,
    Is it possible for us to display a word file which is stored as a BLOB object in  our database.
    We are using BO XIR2.
    Thanks in advance
    Sathish

    Post Author: InfluentialSoftware
    CA Forum: WebIntelligence Reporting
    Sathish - is this query specific to wanting to display a Word file or does it relate to how to display any BLOB objects in the database via Infoview?Thanks,Andy 

  • Can no longer open Word files in finder since upgrading to Mavericks

    When I click on Word files on my desktop of in a folder, the Word progrm laucnhes but file will not open.  I can only open them through the Application.  Any solutions to this?  This seems to be across th board microsoft office issue.  In Office 2008, so do I need an upgrade or patch?
    thank you

    louisefromamsterdam wrote:
    Hi Brody, It doesn't work because Word wasn't in the dock and now I cant drag it there or do it  via 'add to sidebar' - probably because of this awfull Microsoft . is there no other solution to work with mavericks and Word?
    thanks for ideas
    There, I fixed it for you.
    I haven't used Word 2008 in quite a while.
    If Word launches, but doesn't open the file, it is something in Word that is not processing the open request from the Finder.
    You might try resetting the LauchServices database with this command in Terminal:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user
    Can you explain more about not being able to add Word to the Dock or Sidebar?
    It may be a corrupt Dock plist or databse causing that. I don't think it would affect Word opening documents, though.
    I haven't figured out how to reset the Dock and the Sidebar in Mavericks. The way I used to know doesn't seem to work.

  • Opening Word file in Tomcat

    Hi all,
    I have a table in MS Access database that stored some MS Word documents. Those documents and stored as OLE object type in Access. Now i connected my Tomcat with Access using JSP but the problem is how can i open those word files in a separate window. How will i call them from database. Can anyone please help me.Thank you

    How is the request being made? I assume via a jsp.
    When user clicks on link put something like this....
    HTML
    <a id="wordDoc1" href="javascript:openDoc(docIDOrResultSetID)">open Doc<a>now have a function that calls your servlet or jsp that handles the processing...
    JavaScript
    function openDoc(id)
    //build your url (path to the jsp or servlet...)
    var url = "http://yourServletOrJsp";
    url += "?docsID"+id
    window.open(url,'name','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,dependent,width=500,height=500,left=100,top=100');
    }This is just pseudo code nothing special. The main thing is use window.open() to create a new window.
    Now your trick is to grab the content...
    In the jsp or servlet or action class whatever framework you are using... (MVC 1 or 2, Struts - look them up if you don't know)
    Get a handle to the resultset where the doc resides. And get the doc as a clob or blob (dont really know I don't use OLE).
    look here...
    http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/mapping.html
    get that from the recordset and put it into a bytearray --> byte[]
    now return it...
    JAVA
    //your byte array...
    byte[] content = null
    //content is populated
    String strMimeType = "application/ms-word";
    response.setContent(strMimeType);
    OutPutStream outStr = response.getOutputStream();
    outStream.write(content);Something like that there are lots of ways to do this...
    I hope that helps...
    Also you can always just put a link to the file in the DB and keep the doc in a regular directory and use file i/o instead of keeping it in Access. Access starts to bog down when large entries / many records exist.
    -D

  • How to open Word doc stored in BDS?

    I faced the problem using BDS. I have table with stored object_keys of Word documents stored in BDS. I can retrieve url for this docs using METHOD CL_BDS_DOCUMENT_SET=>GET_WITH_URL. But how can i open this document using url or something else?
    For example, 'WS_EXECUTE' don't understand BDS-URL as a doc adress.
    Thanks to all who will try to help me.

    Using BDS_OBJECT_DISPLAY i get runtime exception CX_SY_DYN_CALL_ILLEGAL_TYPE. I use BDS in this way. May be  I don't create BDS doc in a proper way?
    *&      Form  SAVE_FILE_RETRIVE_ID
    *       Locate File in BDS Repository Retrive ID
    FORM SAVE_FILE_RETRIVE_ID CHANGING OBJ_KEY TYPE SBDST_OBJECT_KEY.
      DATA: LV_COMPON TYPE BAPICOMPON,
              LV_SIGNAT TYPE BAPISIGNAT.
      LV_COMPON-DOC_COUNT = '1'.
    *  lv_compon-comp_count = '1'.
    *  lv_compon-comp_id = 'Employee Image'.
      lv_compon-mimetype ='application/x-oleobject'.
    *  lv_compon-comp_size = '1024'.
      APPEND LV_COMPON TO GV_COMPON.
      LV_SIGNAT-DOC_COUNT = '1'.
    *  LV_SIGNAT-DOC_ID = 'IMAGE'.
    *  LV_SIGNAT-DOC_VER_NO = '1'.
    *  LV_SIGNAT-DOC_VAR_ID = '1'.
    *  LV_SIGNAT-DOC_VAR_TG = 'ORIGINAL'.
    *  LV_SIGNAT-COMP_COUNT = '1'.
    *  LV_SIGNAT-PROP_NAME = 'IMAGE'.
    *  LV_SIGNAT-PROP_VALUE ='IMAGE'.
      APPEND LV_SIGNAT TO GV_SIGNAT.
      CALL METHOD CL_BDS_DOCUMENT_SET=>CREATE_WITH_TABLE
        EXPORTING
    *     LOGICAL_SYSTEM  =
          CLASSNAME       = 'DOC'
          CLASSTYPE       = 'BO'
    *     CLIENT          =
          COMPONENTS      = GV_COMPON
          CONTENT         = GV_T_FILE
       CHANGING
          OBJECT_KEY      = OBJ_KEY
          SIGNATURE       = GV_SIGNAT
       EXCEPTIONS
         INTERNAL_ERROR  = 1
         ERROR_KPRO      = 2
         PARAMETER_ERROR = 3
         NOT_AUTHORIZED  = 4
         NOT_ALLOWED     = 5
         NOTHING_FOUND   = 6
         OTHERS          = 7
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " SAVE_FILE_RETRIVE_ID
    *&      Form  OPEN_TASK_DOC
    FORM OPEN_TASK_DOC USING OBJ_KEY TYPE SBDST_OBJECT_KEY.
      DATA: LV_T_FURLS TYPE BAPIURI OCCURS 1,
                LV_URL TYPE BAPIURI,
                FILE_URL TYPE URL.
      CALL METHOD CL_BDS_DOCUMENT_SET=>GET_WITH_URL
        EXPORTING
    *      LOGICAL_SYSTEM  =
          CLASSNAME       = 'DOC'
          CLASSTYPE       = 'BO'
    *      CLIENT          =
          OBJECT_KEY      = OBJ_KEY
    *      URL_LIFETIME    =
        CHANGING
          URIS            = LV_T_FURLS
    *      SIGNATURE       =
    *      COMPONENTS      =
        EXCEPTIONS
          NOTHING_FOUND   = 1
          ERROR_KPRO      = 2
          INTERNAL_ERROR  = 3
          PARAMETER_ERROR = 4
          NOT_AUTHORIZED  = 5
          NOT_ALLOWED     = 6
          OTHERS          = 7
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE LV_T_FURLS INDEX 1 INTO LV_URL.
    * LV_URL - url to the doc we need to display
      FILE_URL = LV_URL.
      CALL FUNCTION 'BDS_OBJECT_DISPLAY'
        EXPORTING
          URL                  = LV_URL
          MIMETYPE             = 'application/x-oleobject'
    *     DOC_TYPE             =
    *     DOCUCLASS            =
    *     FILESIZE             =
    *   TABLES
    *     CONTENT              =
    *     ASCII_CONTENT        =
    *   EXCEPTIONS
    *     DP_ERROR             = 1
    *     FILE_ERROR           = 2
    *     INTERNAL_ERROR       = 3
    *     EAI_ERROR            = 4
    *     OTHERS               = 5
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " OPEN_TASK_DOC

  • Open documents/files from Application Server in forms 6i

    Hello All,
    Our requirement is to open files that are in Application server( We do not want to upload them into database).
    Is there a way to open this files from forms 6i.
    I am wondering how the "View Output" or View log button works on the concurrent program submission form. Its the doing the same thing i.e pulling the file from Application server and showing up.
    Please let me know if anyone has any ideas on how to get this done.
    Thanks
    Sunil

    I assume you are using Forms 6i in web mode here. Then it is just a URL to the file if you properly map to a directory where you store the files:
    web.show_document('http://...../myfile.pdf');
    But it also looks like you are using Oracle Apps, so might want to ask it in the e-Business Suite.

  • Error while opening PDF file downloaded  from database Blob column

    Hi All,
    I am working on jdev 11.1.1.4.0.
    In my use-case I am using filedownload Actionlistner on a link to get the PDF file stored in the database in blob field. These files are being uploaded from other use-case in adf only.
    After getting the dialog box to open/save/cancel for the PDF file when i click on open then i am getting an error *'Adobe Reader could not open 'abc.pdf' because it is either not a supported file type*
    or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly docoded)' for some files , and to my surprise I am able to open some files.
    When I open these PDF files separately from desktop I am able to view the content of each and every file in adobe reader.
    I dont know where the problem exactly lies , while uploading/downloading the file . Any ideas/thoughts to resolve this issue?
    Thanks
    Kanika

    Thanks a lot Timo...!!!
    I checked the PDF file downloaded directly from the blob column in DB, there only it is corrupted so must be the problem in uploading the file. I am checking the code line by line,, but no problem in setting the file content type,size etc.
    Here is the code snippet ..
    byte[] buff;
    buff = new byte[(int)length]; -- Length is the file size
    int bytesRead = is.read(buff);
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = is.read();
    int b = is.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    BlobDomain blobDomian = new BlobDomain((buff));
    TestVORow = (TestVORow Impl)TestVO.createRow();
    if(blobDomian != null) {
    TestVORow.setAttachment(blobDomian);
    am.getTransaction().commit();
    This seems to be Ok to me..the same issue, file is still corrupting.
    Any thoughts from your side ???
    Thanks
    Kanika
    The problem is resolved.
    Changes made are instead of
    InputStream is;
    used ... BufferedInputStream bis ;
    and after
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = bis.read();
    int b = bis.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    bis.close(); // use this close bufferedInput Stream.
    Able to open each and every file now..Thanks for your suggestions Timo and Frank.
    Edited by: Kanika on Mar 6, 2012 3:15 AM

  • Diaplay  Word file stored in blob into a browser using JSP

    Dear All
    I have files stored in oracle table in a blob field.I store the files using forms 10g and webutil. I can upload the files and display them successfully in forms, however when i use JSP to retrieve the files and display them in Internet Explorer, I'm able to display the pdf files, bmp , jpg and video but I'm getting junk characters when I try displaying (word , excel , access or powerpoint files which might contain arabic Characters )
    the code I use to display the files is as follows :
    <%
    try
    Connection conn = null;
    String username=session.getAttribute("username").toString().toUpperCase();
    String password=session.getAttribute("password").toString().toUpperCase();
    String ip = "*****************";
    String sid = "***************";
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@"+ip+":1521:"+sid,username,password);
    String par = request.getParameter("LETTER");
    String par1 = request.getParameter("SERIAL");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select * from TableName where PK1 like '"+par+"'"+" and PK2 like '"+par1+"'" );
    if (rs.next())
    Blob pic = null;
    byte[] blobBytesArray = null;
    OutputStream stream = response.getOutputStream();
    pic = rs.getBlob("BLOBFIELD");
    int len = new Integer( new Long( pic.length()).toString() ).intValue();
    blobBytesArray = pic.getBytes(1,len);
    if (blobBytesArray != null)
    if (blobBytesArray.length > 0 )
    stream.write(blobBytesArray) ;
    catch(Exception e)
    System.out.println("Exception: " + e.getMessage() + "<BR>");
    %>
    can you please guide me of how to display other file types.
    Best Regards.

    Hello,
    Ideally when you store the document put the content-type in a column and set the content type in your JSP. This will indicate to the browser what is the type of file and you should not have any issue with any type.
    Regards
    Tugdual Grall

Maybe you are looking for