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 

Similar Messages

  • 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

  • Poor image quality when displaying OLE Word doc stored in BLOB

    Hello,
    I am migrating some CR Reports from VB6 to VB.NET 2008.
    The reports retrieves Word documents that is stored in BLOB column on SQL Server 2005.
    If CR.NET (same behaviour with 2005 and 2008 versions) renders the word document, the quality is really bad. Looks like an ugly moire effect. The characters below 8pt font size are hardly readable.  I have already set the option "use full color-depth" in the report options.
    If the same word doc is rendered with CR that's included in VB6, it shows a clear and sharp output - the same as displayed in word.
    Where is the difference in handling Word OLE between those two CR versions?
    Is there anything I can do to improve the quality with CR.NET?
    Regards,
    Stefan

    Hello, Stefan;
    Is this a Windows or Web application?
    Visual Basic 6.0 shipped with Crystal Reports 4.6 Visual Studio .NET 2005 ships with Crystal Reports 10.2 and VS .NET 2008 with version 10.5.
    The Crystal Reports application was rewritten in versions 5.0 and  9.0 and a great many changes were made - among them different options for including OLE Objects. See the [Note 1218374|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] for useful new functionality. I tested a report with a linked Word document and it viewed well through Visual Studio .NET 2008.
    Is it possible support for the  the Word format as a BLOB field in MS SQL Server has changed over time. What method is used to create the document as a BLOB field?
    Are you using the bundled version included with Visual Studio .NET? In the article recommending the property 'Retain Original Image Color Depth', there is a note:
    Note: This option only functions with the full version of Crystal Reports 9 or 10. This option does not function with the .NET Report Designer.
    Originally the issue was fixed but only in a full versions of Crystal Reports Developer, not in the versions bundled with Visual Studio .NET.
    I tested with a linked Word document and see some degradation when there is an image in the Word Document but not in the text itself.
    Elaine

  • Uploading the file as a blob to oracle database

    Hi..I wrote a program to upload the files as a blob to the database. It works fine for JSP files but when i try to upload a css file...it gives "No more data to read from socket" exception. I have tried all combinations like trying to upload css file first and then a jsp file and then multiple jsp file and then a css file and so on, thinking that it might be a storage problem. But it gives an error only for the css files...could there be any delimiter kind of symbol or something in the css file which make the oracle think that it is the end of file? Just a guess...any help is appreciated...
    n btw i upload the file using the file input stream and then i use preparedStatement.setBinaryStream method ....
    TIA

    Damn it...I cant believe that i took this long to figure it out...the maximum size of the file that my blob can store is 4 kb...and all my css files are bigger than that...wasted so many hours on this...:(

  • CANNOT DISPLAY A WORD/EXCEL DOC IN BLOB FIELD INTO A PDF REPORT

    We created a report that should display several kinds of documents at one time.
    These documents are stored in BLOB columns in database. We had no problem to
    display txt, gif or jpeg, but we could not display doc, xls, pdf or html
    documents.
    In this report we set three different fields in which display different kinds
    of documents depending on mimetype. The first field has FileFormat property set
    to 'Text' in order to display 'text/plain' and 'text/html' mimetype documents.
    The second field has it set to 'Image', which allow to display 'image/bmp',
    'image/gif', 'image/x-png', 'image/pjpeg' mimetypes. The third field has this
    property set to 'OLE2', and here is where we would like to display other
    mimetype documents as 'application/msword', 'application/vnd.ms-excel',
    'application/pdf'.
    We run the report on the web using:
    http://<server>:<port>/dev60cgi/rwcgi60
    ?server=<report_server>
    &report=<rdf_name>
    &destype=localfile
    &desname=<report_name.pdf>
    &userid=<user>/<password>@orcl9i
    &desformat=pdf
    <6meters>
    I have already read a lot of notes in Metalink but I could not find any
    solution. Is there any way to display a Word/Excel document from database in a
    report?
    We tried to convert Word/Excel docs to html format, but when we tried to
    display an HTML document in the report, we found that Oracle Reports displays
    the source code instead of the HTML format document. So, this did not work.
    What can we do?
    We also read somewhere that a possible solution would be to convert Word/Excel
    documents to a common format like GIF, JEPD or PDF. If processed as gif or jped
    the file could be displayed in the report. If processed as pdf the document
    could be linked in the report.
    I tried to display a PDF in the report but a blank box is displayed. How can I
    do this too?
    Any solutions?

    Hi,
    I have the same problem. I need to show up a BLOB, word file(.doc), in a custom report. I made a simple query, extracting file_date( the column having the blog (.doc) file) from the database, in the report and placed it on a layout by assigning it to a field "F_1". I addressed the file format as OLE2.
    But when I run the Report in APPS, it shows up an error "REP-1814: Report cannot be formatted. Object 'horizontally and vertically' can never fit within 'F_1'.". I also played with the layout by changing its size but the response had no change.
    I am using Reports6i and the output format of the report is PDF. Is there a way to resolve the issue? Please share the solution if you have any for this.

  • 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;

  • How to display and save a picture stored as BLOB in MySQL database in Jsp?

    Hello i am doing a dataentry form where in i will display the picture stored as Blob in MySQL database to the browser. The form also allow changing the picture and updating the picture Blob in the database.
    How can i do it? I try this
    <img src'"<%=rs.getBlob("picture")%> but it doesn't display the picture.
    another thing, how can i save it in the database, if is use the file field in the html form?
    thanks in advance for your help.

    Hello i am doing a dataentry form where in i will display the picture stored as Blob in MySQL database to the browser. The form also allow changing the picture and updating the picture Blob in the database.
    How can i do it? I try this
    <img src'"<%=rs.getBlob("picture")%> but it doesn't display the picture.
    another thing, how can i save it in the database, if is use the file field in the html form?
    thanks in advance for your help.

  • I downloaded a word file from an inbox mail (the mail app) onto my iPad2, where is this file stored? How can I delete it if it takes up space in my iPad? Any ideas??

    I downloaded a word file from an inbox mail (the mail app) onto my iPad, where is this file stored? How can I delete it if it takes up space in my iPad? Any ideas??

    Did you ever figure out what happened?
    I had the same experience as you did, but in my case it was a big fat pdf that Mail insisted I had to download before I could view it. As happened with you, I saw the file actually downloading, and after a time I was able to view the pdf. It's been my assumption that the pdf is still somewhere on my iPad, but I have no idea where, nor how to delete it if it is still there.
    Thanks.

  • How can i display a pdf file stored in my KM from webdynpro link ?

    Hi experts,
    i try to open my pdf file stored in km, in the same window of my webdynpro java who has the fire link ?
    i user tow  iviews with inBound and outBound plug, the first one has the fire link and the seconde an iframe witch i set source parameter to my km link where my PDF is stored. Unfortunately, the iFrame don't work correctly, and my PDF is not be displayed
    Can you give some advices ?

    Hi
    Recently in my project I came across a scenario where my Web Dynpro Project had to pick the image from KM. The images to be displayed will be placed in KM. This will avoid loading the images into the Web DynPro project. More over when you have KM installed on your EP server, one can use it for storing backend data and resources. The KM Admin will be undertaking this task of uploading the images to predefined folder structures. Through the application path to the image will be provided dynamically giving you the flexibility to decide which image to be displayed according to the business logic.
    Getting an image from KM Documents to be used in Web Dynpro
    Uploading files to KM repository using Webdynpro APIs
    KM with WebDynpro
    thanks
    Suresh

  • RETRIEVE OF ETXT FILE STORED IN BLOB

    Hi,
    I have a question on utl file. I wrote some text in an utl file (text file) and stored it as blob in data base at back end while my team mate has to retrieve the data stored in blob in front end using java. when he retrieves, the file which i stored as blob is retrieved as html file not as text file i stored initially . when we retrieve a file stored as blob, how a blob file will be retrieved..is it depends on front end programmer or is there any format where a file stored as blob will be retrieved only on that format? Kindly give your expertise on this question

    As Billy said, the passing through correct mime type is the only reliable way. If you have already loaded tons of blobs without providing this information, you may try a small workaround to determine the right mime type for your files by emulating the file utility behaviour in the database - you have to load the /etc/mime-magic or something similar for your os into the database and then compare certain bytes of your lobs with those recorded in the mime-magic file. An example how it can be done is here
    http://articles.techrepublic.com.com/5100-9592_11-5219073.html
    You could so complete the missing information in the database without to unload your data , but you should be aware - this can not replace the need to provide right mime type information by loading into database.
    Best regards
    Maxim

  • Oracle reports to display PDF/Excel files stored in the Database

    can we use Oracle reports to view/display PDF/Excel files stored in the Database? Thanks Lalitha

    A document stored in the database can be easily retrieved in or via the browser using mod_plsql. Simplified:
    select content, mime_type
    into v_blob, v_mime_type
    from ...
    owa_util.mime_header(nvl(v_mimetype,'application/octet'),false);
    htp.p('Content-length: ' || dbms_lob.getlength(v_blob));
    owa_util.http_header_close;
    wpg_docload.download_file(v_blob);So, the link in your report should point to this database procedure.
    Edited by: InoL on Mar 1, 2011 4:17 PM

  • Displaying MS Word File in browser

    Hello,
    Can anyone pls tell about the method to display MS word file present in a folder in my site on the browser.
    I dont want it to give it as download dialog box.
    Thanks
    Sharath

    It may still be easier to use Google Documents.
    But if you don't want to do that, I suggest that you check SourceForge or jakarta.apache.org. There's a project called POI that lets you process some Microsoft Office documents in Java (Excel in particular), and there's probably one that deals with Word docs. Someone may have already written a utility that uses that to turn Word into HTML. Then you could tie that into your servlet environment.
    Trying to display the Word file on the user's browser, directly, as a Word file and not processed into something else, is likely to be a tremendous pain in the butt.
    Another thing you could possibly do is convert all your Word documents into HTML or XML or some other more portable format, before you even install them on your server. Make it part of your build/deployment process. It sounds a bit painful, and it might be at first, but doing things at build time is much nicer than doing it at run time.
    Generally, I'd advise moving away from Word format completely, even before build time, if you can possibly get away with it.

  • How can I perform the conversion of pdf files in Cyrillic script to Word files in Cyrillic script. The pdf file is too small for me to read right now. Julyan Watts

    How can I perform the conversion of .pdf files in Cyrillic script to Word files in Cyrillic script. The .pdf file is too small for me to read without a magnifying glass, and the document is more than one thousand pages.

    This answer was not helpful. First of all, I could not find "tech specs"
    anywhere on the Acrobat 11 homepage. And secondly I purchased this software
    for the specific purpose of converting .pdf files to Word. It was only
    after I had completed the purchase that I learnt that Acrobat does not
    permit the conversion of .pdf files in Cyrillic to Word files  in Cyrillic.
    I feel that Acrobat should have provided this crucial information before I
    allowed my credit card to be debited. That is why I  am now asking for my
    money back. But thanks for your attempt to solve my problem, even if it was
    not successful.
    Julyan Watts

  • How can i display a image file which is placed in the applications server

    Hi all,
    Can any one help me how can I display a image file which is present in the application server.
    With regards,
    M.Ramana Murthy

    hi,
    *& Form TOP_OF_PAGE
    * text
    FORM F_TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_LISTHEADER
    i_logo = Logo name
    * I_END_OF_LIST_GRID =
    ENDFORM. "TOP_OF_PAGE
    rgds
    Anver

  • Required the details of jar files which is loaded in the database

    Hi
    We are having a 10g database which is running under Solaris machine. There are lot of .jar files which are loaded into the database. I would like to know how to find those .jar file details atlease the name of the files which are loaded in the database. Is there any view for this.
    I couldnt find anything from the Java option in TOAD
    Please provide a solution.
    Thanks
    SHIYAS M

    From 11g onwards, you have
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> desc javajar$
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    PATH VARCHAR2(4000)
    CONTENTS BLOB
    SQL> desc javajarobjects$
    Name Null? Type
    JARNAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    OBJNAME NOT NULL VARCHAR2(40)
    NAMESPACE NOT NULL NUMBER

Maybe you are looking for

  • Printing a PDF and keeping the original size.

    I have a question, in my workplace I have to share documents with other departments. I draw them in Illustrator and save them as PDF, since is the only way they can print them. My problem is that the drawings are size sensitive, if I draw a 4 x6 inch

  • Safari, itunes, skype, system preferences crashing

    Hello, almost all of my applications (except firefox tahnkfully, so i can get this post up) seem to be crashing upon launch or freezing, forcing me to force quit them. Any ideas? System preferences: Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception

  • PLS-00428 Error when creating a new trigger

    Hi, I'm encountering the PLS-00428 error when I run the script below. CREATE OR REPLACE TRIGGER TIBCOUSER.po_response_trigger BEFORE INSERT ON po_response FOR EACH ROW BEGIN IF:NEW.ariba_processsequence is null then SELECT pttransid AS pttransid, 'Pr

  • Integrating crystal report with java

    Hi Any one can send me sample program for integrating Crystal report with java.I dont know how to integrate java with cryatal report.if any one helps me out from this problem an advance thanks to them Thanks Dilip

  • I just updated to IOS 7.0.4

    and now it has an icon to connect to ITunes but when I connect it does nothing. HELP.