Displaying a BLOB/CLOB on the web

Greetings:
I have been having this issue for quite some time now in PL/SQL:
I am attempting to do the folllowing in my code:
One can upload a text file (Terms & Conditions text). The data gets saved temporarily as a BLOB in the database. I then would like to display this data for the user on the HTML page. I have tried various ways to do this.
I.e., via the dbms_lob.read function (while looping through) (that was one method). The other method I tried was to convert the BLOB to a CLOB and to then print the CLOB via the following procedure:
PROCEDURE p_print_clob (pv_text IN CLOB)
IS
lv_ptr number (7) := 1;
BEGIN
WHILE lv_ptr < LENGTH (pv_text)
LOOP
HTP.p (SUBSTR (pv_text, lv_ptr, 2000));
lv_ptr := lv_ptr + 2000;
END LOOP;
END p_print_clob;
No matter what, however, I always encounter the following error:
ORA-06502: PL/SQL: numeric or value error
I made sure that I am passing the right variables/data types and I am. It appears to be a size issue. How can I resolve this? Or, could you please help me to successfully display the contents of a file (saved to the database as a BLOB) on the HTML page? This issue has had me puzzled for quite some time now. Thanks in advance!

My post has a link to an example of using the procedure. Did you follow that link? Is there something in the example that is confusing?
"Download" in this case just means that the client (the web browser) will need to download the LOB from the database server. How the text is actually rendered (i.e. whether it is displayed in the web browser or whether it gives the user the option to save the file) will depend on the headers that you set (via OWA_UTIL.mime_header) and the Content-Disposition you set, if any. I believe the example I linked to will just display the LOB in the browser window.
Justin

Similar Messages

  • Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types. $(...).slick is not a function (OnPostRender: )

    Hi Team,
    I implemented news carousel using display template concepts.
    Its working.
    But some times it shows like some thing went wrong
    when clicke on show details
    it showing the error like
    Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.
    $(...).slick is not a function (OnPostRender: )
    some times showing result and while refreshing the page am getting the error like below
    How to fix the issue
    Regards,
    Dhayanand

    Hi Wendy Li,
    Finally we fixed.
    The prob is that we referring two different version of jquery files in master page and page layout.
    We corrected by referring same version of jquery files in both pages
    Regards,
    Dhayanand

  • How do I get the Adobe toolbar to display above a pdf in the web browser?

    Hi guys,
    I'm just having trouble with locating the grey toolbar, it's not displaying when I open a .pdf in a web browser.
    I can open the .pdf fine, (within Safari), and usually (on my old computer) there was a grey toolbar above the .pdf & there's a print icon on it - that's what I'm looking for, so that I can print my lecture notes straight away.
    The toolbar won't display on the web browser above the .pdf, but if I save the .pdf & open it with Adobe Reader, then the toolbar displays there with all of the icons etc.
    So I was wanting to know if instead of saving them every time, if there's an option to get the toolbar displaying above .pdfs in Safari?
    Has anyone else encountered this problem?
    Any help would be greatly appreciated.

    Unfortunately, iOS does not provide a way to install "plugins" to Safari so there is no possible way the Reader can do this. You can use the "open in" functionality to launch Reader from Safari.

  • How to display an SAP document on the web (ECC 6.0)

    Hello all,
      currently upgrading from 46C to ECC60 and we are having trouble with one of our current processes. 
    We currently have a custom RFC that creates spool files and turns them into a PDF stream via CONVERT_OTFSPOOLJOB_2_PDF.  The RFC is called from one of our web applications that then displays the document via PDF on the web.
    We are having trouble using this same process in ECC 6.0 so I'm wondering if there is a different approach to do this in ECC 6.0.
    History of what has been done so far.
    1) since we are now on a UNICODE system the PDF stream sent via the RFC call was displaying chinese characters instead of "%PDF" etc (2hex char vs 4hex char). We attempted to fix this by using the method cl_abap_conv_in_ce=>create to convert each line of the PDF stream.
    2) After inserting the method some of the documents started working but others are getting a parsing error.
    We are looking to see if anyone knows of a more standard approach to getting the same thing done.

    We have experienced the same problem since we upgraded to ECC 6 and unicode last week.  The suggested code worked but there was a step missing in the example that I would like to share.
    The spool output was table TLINE which is 134 characters.  Once you convert to non-unicode you actually have to put the results in a 268 char table.  When you read it in .NET and convert it to a binary array before passing it to Acrobat for viewing you have to make sure that you pad each record with spaces up to 268 charactes.  This was key!
    Here is the code from our RFC after calling the CONVERT_OTFSPOOLJOB_2_PDF with a spool id:
    data: PDF STRUCTURE  ZC268_STRUCT occurs 0 with header line.
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
      exporting
        src_spoolid                    = f_rqident
      tables
        pdf                            = pdf.
    data:     rf_conv type ref to cl_abap_conv_in_ce.
    rf_conv = cl_abap_conv_in_ce=>create( encoding = 'NON-UNICODE' ).
    data: fta_data type table of zc268_struct with header line.
    data: f_str    type string.
    field-symbols: <f_src> type x.
    loop at pdf assigning <f_src> casting.
         call method rf_conv->convert(
          exporting input = <f_src>
          importing data  = f_str ).
          fta_data        = f_str.
          append            fta_data.
          clear             fta_data.
    endloop.
    The data in fta_data can be passed to .NET
    I hope that helps.
    Hussam

  • How to display an image located in the WEB-INF directory?

    Basically, When a user registers, they a directory is created with their username that holds images that they can upload. How do I display those images. All I am holding in the database is the location of the images.
    ive tried
    <img src="/WEB-INF/users/testuser/picture.jpg" />
    but this doesnt work and for obvious security reasons shouldnt.. but is there another way of doing what i want to do? perhaps a custom tag? thanks
    Jazz

    You would have to write a generic servlet that would return an image
    <img src="/getImage?user=testuser&pic=picture.jpg" />Your servlet would basically fetch the file from under web-inf, and then stream it back to the user.
    Methods to use:
    servletContext.getRealPath() (to help find the file on disk), relative to your web app
    getOutputStream (as opposed to getWriter)
    It is only in this way that you can access files on the server outside of the public web directories.
    Hope this helps
    Cheers,
    evnafets

  • FireFox 3.6.12 doesn't display an iFrame (an Amazon sales link) that displays in IE8, Chrome, and Safari. It displays iFrames of PDFs on the web site.

    I support www.oaklandsymphonychorus.org, a site using DotNetNuke 4.9.5. I added an iFrame module to the site using the URL in this code:
    <iframe src="http://rcm.amazon.com/e/cm?t=oaklsympchor-20&o=1&p=8&l=as1&asins=B002FQJT3Q&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
    The iFrame displays in IE8, Chrome, and Safari, but not FireFox.

    '''Solution:''' Add ''id'' and ''name'' attributes to the iframe-tag.
    This problem is covered in this thread: http://forums.mozillazine.org/viewtopic.php?f=25&t=1942409

  • A problem displaying PDF file in the Web Browser layout.

    I'm hoping someone can help me with this issue.  I need to display my PDF documents in the web-browser layout as part of my daily job.  I use JAWS 14, and many times, when my document is launched, it comes up blank, or at least that's what JAWS reports.  If I press the F5 key to refresh the page, then it displays properly.  I need the document to show up properly when it is initially loaded.  How can I accomplish this?    

    I'm hoping someone can help me with this issue.  I need to display my PDF documents in the web-browser layout as part of my daily job.  I use JAWS 14, and many times, when my document is launched, it comes up blank, or at least that's what JAWS reports.  If I press the F5 key to refresh the page, then it displays properly.  I need the document to show up properly when it is initially loaded.  How can I accomplish this?    

  • Why does the web look TERRIBLE on my new Retina display?

    The new retina display is fantastic, but browsing the web looks horrible.  Can anything be done to improve the web browsing experience? 

    Most websites are designed to look good on low end computers, typically with a resolution of around 1024x768.
    Our retina macbooks have such a high resolution display that they basically show the flaws you would not normally see on a low resolution display.Text that is rendered using the mac os system fonts should look beautiful, but low resolution pictures and non-native text will look terrible on any website or application.
    There is no real fix for this issue, other than hoping the web in general starts moving to higher resoltuion content in the future. The same problem exists with the retina iPad, and in my opinion, things look even worse on the ipad since you tend to be zoomed in further while browsing the web.

  • Viewport setting is Not giving right output when forms on the Web

    I have a stacked canvas which has a rounded rectangular graphics. When I manipulate the viewable area using viewport settings, I am getting different (unxepected) view when the form is deployed on the web. for example,with the viewport x position on canvas set at 0, viewport y position on canvas set at 13, and view height set at say 18, the form displays unexpected area when on the web. when on client/server arch. it behaves fine.
    I have oracle 9.0.2 for the web application. It is running using ocj4. Please assist. If there is any patch out incase, advise me the right one.
    Thanx

    Hi,
    This has been reported as a bug for Forms 6i and was fixed in a recent patch set. I assume that For,s 9i inherited this problem form 6i. The work around for this issue is to dynamically set x pos of the viewport:
    SET_VIEW_PROPERTY('stacked1',VIEWPORT_X_POS_ON_CANVAS,get_view_property('stacked1',VIEWPORT_X_POS_ON_CANVAS));
    Frank

  • How to display PDF BLOB file within Forms

    Hi All:
    I just want to know if is it possible to display PDF blob file within the forms. Currently I use webutil to open pdf in browser. This time I need to display it in forms, so that upon scrolling, the user can view the pdf images of that particular record.
    TIA

    Hello,
    <p>Did you see this Java Bean ?</p>
    Francois

  • Displaying a blob inline.

    Greetings,
    I have the following scenario. I have two regions in two separate columns side by side. I have a table with a blob field in it that is storing PDF and html files inside that field. In column 1, I have a report detailing what is in my table (descriptions, etc), and a link that they can click on to display the blob.
    Here's where the fun starts.
    If the blob is anything other than a text file (html), I have written an external procedure that allows the user to download the BLOB. HOWEVER, if the BLOB is of mimetype text/HTML, I want to be able to display the HTML TEXT inline inside Column 2. which is to the right of Column 1. As it is right now, my region with the pl/sql call in it causes that region to be the only region to display. This works easily enough with an &LT;img src="<owner>.<pl/sql routine>?fileid=<fileid>"&GT; This will display an image inline. How does one display a document though inline?
    Here is the pl/sql code that I have..
    procedure DisplayInLine(p_file in number) as
       d_id  number;
       d_doc blob;
       d_mime varchar2(255);
       begin
         select doc,mimetype into d_doc,d_mime from doctable where id = p_file;
         OWA_UTIL.MIME_HEADER(d_mime,FALSE);
         HTP.P('Content-Length: ' || DBMS_LOB.getlength(d_doc));
         OWA_UTIL.http_header_close;
         WPG_DOCLOAD.download_file(d_doc);
       end;Any ideas?
    Any help greatly appreciated. I have the external download stuff working fine.. It's just trying to display that BLOB inline in the second column.
    thanks,
    cliff

    Instead of using img src="<owner>.<pl/sql routine>?fileid=<fileid>">
    Try <iframe src="<owner> <plsql routine>?field=fieldvalue"></iframe>
    google iframe for options for display width and height
    Message was edited by:
    pjflynn

  • How to display clob/blob in the web layout using Reports9i

    Hi,
    I've created a report that selects both a clob and blob datatype in the query. However, when I run the report using the 'Run Web Layout' tool no data is displayed for these columns. Does the <rw:field> tag support such datatypes ?.
    Regards,
    Chris

    Hi Chris,
    Reports9i supports both BLOB and CLOB in both paper as well as web layout. Pl make sure that in the column properties that you want to display, you have selected the "File Format" correctly (to do this, go to data model > column > property inspector > file format). Eg, you can select "text", "image" etc depending on what you have stored in the column. Also, when you want to display an image in the web layout, you will have to write containsHtml="yes" inside your <re:field> tag.
    Navneet.

  • Display BLOB/CLOB image data in OBIEE 11g

    Dear Gurus,
    I want to display employee profile picture in dashboard, the image data was saved as blob/clob image.
    How to configure and display it in obiee?
    Regards
    JOE

    Hi
    Thanks for your quick response.
    actually im not using EBS, im just using publisher with OBIEE 11g.
    if explain step by step what you wrote first replay-
    Let i have a table with one BLOB column.
    1) first load blob data to my table
    2) create data model from oracle publisher.
    3) change the xdm file with above tagline , my xdm file is in below link-
    C:\mw_bi_home\instances\instance1\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\catalog\SampleAppLite\root\shared\zia%2exdm
    i don't know is that right step? because if i re-open the xdm file after change by your given tagline its shows error.
    I will grateful to you please give me a little explanation which file i can put the following tagline.
    _<fo:instream-foreign-object content-type="image/jpg"><xsl:value-of select=".//IMAGE_ELEMENT"/></fo:instream-foreign-object>_
    Thanks again and waiting your feedback -
    @zia

  • How to display BLOB image column with WEB application, JSF, ADF BC

    I looking for a way to display the content from a blob column on a WEB application, JSF, ADF BC
    The blob column contains a JPEG image.
    About the application
    The model contains a viewobject where the blob column attribute (photoimg) type is of type : BlobDomain
    Now I have to create the view to display the content of photoimg inside a JSF-JSP page.
    Any advice ?

    Search is your friend
    How to display the content of a BLOB column in a ADF/BC pages ?
    John

  • Menu toolbar icons not displayed in colour when deployed on the Web

    Hello!
    We are developing an application using Forms6i on Windows NT.
    Our problem is that menu toolbar icons are not displayed in colour when the application is deployed on the Web using lookAndFeel = generic. This is the case both when using Microsoft IE5 and Netscape 4.5. When lookAndFeel = oracle, however, the icons are displayed in colour.
    The icons are stored as *.gif files in the same directory as the application *.html file. It does not help to create a virtual path /web_icons/ in the www listener and edit the parameter default.icons.iconpath in the file Registry.dat.
    When running the application as client/server, the menu toolbar icons are displayed in colour as expected.
    Any ideas on how to solve this problem?
    Regards,
    Kjell Pedersen
    Nera SatCom AS
    Norway
    null

    Hi,
    I got the same problem and I didn't figure out, how to solve this problem.
    But did you try to printout the form anyway? I guess you will see the icons on the printout, won't you?
    Regards
    Dirk

Maybe you are looking for

  • Error in SOAP to file scenario

    Hey guys i m doing a SOAP to File scenario and getting the following error. <SAP:Stack>"COMMUNICATION FAILURE" during JCo call. Error opening an RFC connection.</SAP:Stack> any idea where should i look ? thanx ahmad

  • 0 bytes file free on curve 8320??

    All, Please help, I got stuck with my 8320. Device is "thinking" very often and impact to my activities and also the battery. When I check Status on option, File free is 0 bytes.. but when i restart (take off the batt), file free is have some bytes a

  • How to apply colors and themas in ADF

    Hi, JDeveloper ADF 11g. I want to make different color & themas configurable by the user. Can anyone please help me how can i do it? Thanks -Amit

  • Operations Manager Event ID 31901

    Hi all,           I am getting error in operations manager agent status column. The error event id is 31901. I have searched a lot on the net for it's resolution but did not get any helpful link. So please help me to solve this error. Thanks, Vishwaj

  • 1.3 Identity Plate

    In 1.2 I created a two line identity plate. It only lasted until I tried to edit it in 1.3. Having line feeds let me put a copyright notice on the second line. Looked like a cool feature to me.