How to print a pl/sql raw or BLOB to html page with htp.p command

Hi!
I have a jpeg image I retrieved from the OID and it is stored in an DBMS_LDAP.BINVAL_COLLECTION, which is supposed to be similar to a BLOB or PL/SQL raw collection. What I want to do is to print it to my portal page. I have been using htp.p to print all the other values such as name, department etc, and the only thing I can't get out to the page is the image. How do I do this? I suppose I can just declare a variable of the type BLOB, and give it the binary value I have in the BINVAL_COLLECTION, but then how do I get it to my html code? Do I have to convert it to something, or use some function. I don't know much pl/sql so detailed instructions would be very helpful. Thank you
/Marie

I tried that, but I get the error "Wrong number or types of arguments" in the Read method. See my code below:
PROCEDURE read_image(p_photo DBMS_LDAP.BINVAL_COLLECTION)
AS
     src_lob blob;
     buffer raw(2048);
     amt BINARY_INTEGER := 2048;
     pos INTEGER := 1;
     doctype number;
     BEGIN
     owa_util.mime_header( 'image/bmp', false );
     owa_util.http_header_close;
     -- the query
     --select into src_lob from where ;
     LOOP
--THIS IS WHERE I CHANGE THE BLOB FOR MY BINVAL_COLLECTION, BUT GET AN ERROR
     DBMS_LOB.READ (p_photo, amt, pos, buffer);
     pos := pos + amt;
     htp.prn(utl_raw.cast_to_varchar2(buffer));
     END LOOP;
     exception when others then
     NULL;
     END;
Is there something wrong with this code, or else how do you mean I shold just replace the blob whith the DMBS_LDAP.BINVAL_COLLECTION
/Marie

Similar Messages

  • How to print a PDF file that was display in my page...

    Hi !. My doubt would be the following one... I would like to know how to print a pdf file that was displayed in my page ?... I mean the PDF file not the page...
    The PDF would be in this url:
    http://iprodesa.lasegunda.com.ar:8090/datos/pdf/830.pdf
    How could I implement this ?...

    This first question which comes to mind is how do you display the pdf file in the browser?
    For this the browser uses a plug in (e.g. adobe reader) which already has the ability to print the pdf file. Depending on the version of your plug in, printing is started differently.
    Timo
    Ps: which jdev version do you use?

  • How to set a cookie in the browser from an html page called via an Iview

    How to set a cookie in the browser from an html page called via an Iview
    Hello all,
    I have an issue which is causing problems. I have a snap survey (html form with submit and cookie setting) which is embedded in a url iview.
    Although the submit and the form work fine, the portal will not allow the cookie to be set it seems.
    Is there a way to allow cookies to be set from an embedded page in a url iview??
    You will make my day if you know!
    System: EP7 SP13
    Kind regards
    Alex

    Hi,
    Check this:
    http://www.oracle.com/technology/products/ias/portal/html/same_cookie_domain_with_pdkv2.html
    Cookie Basics
    Web browsers have built in rules for receiving and sending cookies. When a browser makes a request to a web server and the web server returns cookies with the response, the browser will only accept a cookie if the domain associated with the cookie matches that of the original request. Similarly, when a browser makes a subsequent request, it will only send those cookies whose domain matches that of the target web server.
    These rules are designed to ensure that information encoded in cookies is only "seen" by the web server(s) that the originator of the cookie intended. These rules also ensure that the cookie cannot be corrupted or imitated by another server. By default, the domain associated with a cookie exactly matches that of the server that created it. However, it is possible to modify the domain at the time the cookie is created. Relaxing the cookie domain increases the scope of the cookie's visibility making it available to a wider "audience" of web servers.
    For example, if a cookie is created by a.us.oracle.com, it's domain will usually be set to a.us.oracle.com. This means that the browser will only send the cookie to a.us.oracle.com. It will never send it to any other servers. However, if at the time of creation, the domain of the cookie is set to .us.oracle.com, the browser will send the cookie to any server whose domain falls within .us.oracle.com. such as portal.us.oracle.com, provider.us.oracle.com, app.us.oracle.com etc
    Regards,
    Praveen Gudapati

  • How to call html page with in the flash

    I am new to action script, can some one guide me how to call html page with in the flash. lets say i have movie clip having instance name as "news_feed", I need to disply the html page in this news_feed. kindly help me, thanks alot

    some one tell me, weather it is possible or not ??

  • How to print in PL Sql using a procedure?

    So how do you create a procedure to print a name in PL Sql ? Here is what I have done so far.
    Create Procedure Print_Info
    ( X_Name IN Varchar2
    ) As
    Begin
    :X_Name:='Anabella'
    DBMS_Output.Put_Line (X_Name);
    End Print_Info;
    thanks

    user8706975 wrote:
    So how do you create a procedure to print a name in PL Sql ? You cannot.
    PL/SQL is a server process. It is not connected or wired to a keyboard, mouse, screen or printer.
    The client process (SQL*Plus, TOAD. etc.) interfaces with the end-user - it is connected to peripheral devices like mouse, keyboard and screen.
    And this is exactly what client-server is. And which is why the task to "+Print data using PL/SQL+" is missing the fundamental concept of what client server is. It is utterly and totally flawed. And should you be doing this as some kind of course, then you should seriously question what they are teaching as the concept of PL/SQL printing anything is just plain bloody wrong.
    So how does DBMS_OUTPUT then works? The DBMS_OUTPUT package has a static buffer area (variable) that you can place data into using the put and put_line procedures.
    A client, like SQL*Plus, can then interrogate this buffer after executing PL/SQL code, and remove and display the content in that buffer to the end-user. This is not "+printing by PL/SQL+" just as running a SQL select from a client and viewing the data (in the client) is not "+printing by SQL+".
    It is very important that you grasp correctly what client-server is and the basics of how it works - as that will enable you to truly understand what PL/SQL is, what Oracle is, and how to correctly use it. It will enable you to understand how to troubleshoot performance problems, how to design systems optimally and so on. One cannot simply learn PL/SQL the language and expect to be a good Oracle developer. Understanding what client-server is and how it works in Oracle, is more important than to be an expert on a specific programming language. Knowing a programming language does not mean being able to architecture efficient and scalable solutions using that language.

  • How to  print grouped  field  in the margin area of main page

    I have one requirement where one grouped column has to printed in the margin area and not in the main area.
    ie. if i group by deptno,
    deptno has to be printed behind where date is printed in the margin area
    and for each deptno page changes
    how this can be achieved ? any idea
    because you cannot move deptno from its parent frame.
    anybody knows about this?
    regards

    To have one dept per page, set the Maximun Records per Page property of the dept repeating frame to 1. To display dept in the margin, create summary column that would find Max (or First) deptno with Reset on Page.

  • How to change the file name of pdf file in html page?

    Hi,
    Actually my requirement is to upload 50 PDF files containing javascript in each file into flex page with the help of one html page.
    i did the the javascript part by using batch processing.
    now i want to call those pdf files one after another without changing the file name in html page
    the code written in html page is
    <html>
        <body>
            <object id="PDFObj"
                    data="http:\\localhost\pdf\20090807 - Batch 630.pdf"
                    type="application/pdf"
                    width="100%"
                    height="100%">
            </object>
            </body>
    </html>
    So every time i have to change that file name to acess another file.
    Is there is any other way to sort this problem????
    Plz anyone help me to sort out this problem with some code or some example.

    I once had a similar task for creating a webpage that I only use on my computer--a webpage that accesses PDF's and SWF's font previews from a list of fonts as "a href's".  What you must do is utilize the power of the command line, whether on a Mac on a PC or on Linux, Linux being the most powerful (although Mac IS Unix).  You must utilize variables, variable replacement, and then a command to print out the results of a "for" or "while" loop to a text file which will be your HTML file with each individual link automatically built into the HTML code.  You will have a list of 50 links.  If you are simply looking for a GOOGLE type functionality where you click on "Next" and "Previous" you will have to dig deeper into variable replacement--this I don't know how to do yet but there are books for command-line shell interpreters.  One shell interpreter is called "bash" (born-again shell) and there is a book on the market which gives a detailed example of how to replace variables in a shell script.  Again, I don't know how it works.  I will try to learn this at a later time when I am more seasoned with the basics of shell scripting.

  • How to Unload and Reload a Composition into the same HTML page?

    TLDR:
    When loading multiple Compositions into a html page via AdobeEdge JavaScript, how do I remove/delete/unload a loaded composition so that it can be added/loaded to the same page again later? I am open to options not mentioned here, but this is done externally, not within Edge's limited code abilities (working with multiple comps on one page).
    *Note: I am making comps in Edge then loading multiple within my own JavaScript/HTML external pages. This programming is NOT done within Edge's code.
    Overview:
    I could have more than 50 compositions to load into my page, but only one is displayed at a time. In order to make this easier on the user, I load 5 into the page in divs with display: none. I set the id of the first one to an id that has my css to show the content properly. When clicking next, that div is set back to an ID that has hidden css values. Going forward and back works the same. This functions properly. This puts all the obvious preloading in the beginning so the user doesn't have to wait again, as comps are preloaded in the background while they are viewing other comps.
    As the user moves farther, I drop the first div and add one on the end with the next comp. This works fine. I can go forward all day, no problem by removing the first div element and adding one to the end. This should make memory not horrible, since theoretically, the comps would be removed as needed...
    Problem:
    The problem is if the user wants to go back. If I drop the last div and add one to the front, the comp (which was loaded and dismissed earlier) cannot be re-loaded. It also cannot be re-added, even if the div is cloned and re-added later.
    This is the code I am using to load the comps:
    $.getScript('comp_' + i + '_edgePreload.js', function() {});
    Options:
    The options I have thought of (and not found a way to make them work) in order of preference:
    Fully unload the comp from memory, that way when I make the call to load the comp, it will act as if it has never been loaded before. (Is there a way to unload a comp completely? I haven't found one, but the API is sorely incomplete) **I want this one to work very much.
    Ok, maybe you can't actually unload a loaded comp. Can you re-add it to a new div? I have printed out every option I could thru AdobeEdge's interface, and cannot find a way to re-make a div the way it was. Heck, I'd be happy to load the content into a non-child element in JS, then append to html when I actually want to display it. I can't find how to re-setup the div, which has the correct Class and is set up the way it was when the comp was loaded the first time. (this option is bad because it seems all of the comps are still in memory, but at least it would work)
    Worst case, I have tried this and ALMOST got it to work. When I removed the old divs from the page, I cloned them and added them to an array of objects in JS. Then, when going back, I pushed them back out, so it was an EXACT copy of the original div, all content was the same, all id, class, style, etc was the same. Unfortunately, AdobeEdge seemed to lose the ability to talk to it. (AdobeEdge.getComposition('EDGE-MyUniqueIdentifier').getStage(); // returns undefined). How do I tell it to re-associate the div with the object that still exists here? And obviously, this is an awful solution, since it appears that all of the comps stay in memory, but I was desperate to simply make it work somehow.
    If you need code examples of any of my attempts at the previous options (I have tried them all extensively, and unsuccessfully), I can provide it. I hope someone has found a way to deal with this or has links to actually useful information. Most posts I have found simply tell you to load all your comps and hide/unhide them as needed. This works for small-scale, but when you have a lot of comps to move between, it becomes less of a viable solution.

    Exactly the same problem here. Could anyone from EDGE TEAM answer to this question?
    How we can UNLOAD and LOAD same or another animation using SAME or DIFFERENT dinamically created DIVS?
    Affter loading the second animation AdobeEdge.getComposition('EDGE-MyUniqueIdentifier').getStage() returns undefined.
    Thanks for ther support.

  • Problem Printing html page with JEditorPane...

    Hello All,
    I Have a problem in printin html file with JEditorPane...
    My Html file contains a Table on it..
    Problem is that JEditorPane displays the html file correctly but
    it prints the file without print that Table..
    So pls help me...
    Thanx in advance,..
    Amit
    [email protected]

    I think you would know how to retrieve content of an HTML page using the URL object. Just in case.
    My apology if this short note doesn't help you at all.

  • How to extract image from oracle database and display at html page

    Could you help me how to make the image to display. i manage to extract the data but the data is in Blob so i need to convert it so make it display at html page.

    Thanks for ur reply Mr.Rajasekhar
    I tried as u said,
    i tried without converting to sql date ,but still i din't get any results
    java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
             java.util.Date fromDate=dateFormat.parse(startDate);
            java.util.Date tillDate=dateFormat.parse(endDate);          
              String query1="select MTName,Date,MTLineCount from linecountdetails where mtname='"+MTName+"'  and Date >='"+fromDate+"' and Date <='"+tillDate+"' " ;
            System.out.println(query1);
    //From main method
    databaseConnection("prasu","1/12/2005","31/12/2005");I got the output as
    ---------- java ----------
    select MTName,Date,MTLineCount from linecountdetails where mtname='prasu'  and Date >='Thu Dec 01 00:00:00 GMT+05:30 2005' and Date <='Sat Dec 31 00:00:00 GMT+05:30 2005'
    java.lang.NullPointerException
    null
    null
    java.lang.NullPointerException
    Output completed (4 sec consumed) - Normal TerminationThanks
    Prasanna.B

  • How to embed a Video stored in KM repository on html page

    Hi All,
    I have a requirement to embed a video stored in KM repository on html page.
    My html page and related file referred in html code below (highlighted) are stored at following path in KM “root>documents>test” with the same name as mentioned in code.
    Code which I got from net for embedding an .flv file on html is mentioned below but how should I modify it to take files stored in KM.
    <html>
    <head>
    <title>Flash Test</title>
    </head>
    <body>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="Jacksonville" name="movie" width="425" height="305" align="center" id="movie">
                               <param name="allowScriptAccess" value="sameDomain" >
                               <param name="movie" value="<b>player.swf</b>?file=<b>Radvan_001MEDWHI.flv</b>" >
                               <param name="menu" value="false" >
                               <param name="quality" value="high" >
                               <param name="scale" value="noborder" >
                               <param name="salign" value="lt" >
                               <param name="wmode" value="transparent" >
                               <param name="bgcolor" value="#000000" >
                               <embed src="<b>player.swf</b>" menu="false" quality="high" scale="noborder" salign="lt" wmode="transparent" bgcolor="#000000" width="425" height="305" swliveconnect=true id="movie" name="movie" align="left" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="<b>install_flash_player_active_x.msi</b>" >
                             </object>
    </body>
    </html>
    Please guide me for the same.
    Regards,
    Madhvika

    Hi,
    I have stored all the files referred in code ( player.swf, install_flash_player_active_x.msi and Radvan_001MEDWHI.flv ) at root>documents >test folder in KM repository
    <u><i>Julian</i></u>
    My requirement is to know, what path i should give for the files highlighted with bold in my code as they are stored in KM .
    <i><u>
    Praveen</u></i>
    Can you please tell me how should I modify these lines in code (name of video file is Radvan_001MEDWHI.flv)
    <param name="movie" value="player.swf?file=Radvan_001MEDWHI.flv" >
    embed src="player.swf"
    pluginspage="install_flash_player_active_x.msi" >
    Regards,
    Madhvika

  • How to insert a Jquery slideshow to a template based html page?

    I would like to insert a simple jquery slideshow into an existing div in an html page which is linked to a template page. Do I add the js files and code to the template html or the child html where I want the slideshow? Do I need to divorce the page from the template? It seems that the js has to be put into the head from what I've read so far and this is not editable in a template child...
    lunairecollective.com/news.html is the page I wish to alter, currently there are very simple links with swap text of container. I would like to have a cyclic slideshow in the div to replace the current swap images and links.
    The website is in html4 transitional, and I'm using Dreamweaver cc
    Thanks for any help!

    Yes, there are editable areas in the child page as you saw from the website address. And I can see there are some editable elements in the head, though not all of it. Could you show me where I should insert the javascript code for a jQuery slideshow please? The relevant code follows:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html><!-- InstanceBegin template="/Templates/lunaire4_temp.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- InstanceBeginEditable name="doctitle" -->
    <meta name="description" content="The most recent review of Lunaire Collective printed in The Australian newspaper.">
    <meta name="keywords" content="review, The Australian, Whistler, Tom Green, Birtwistle secret theatre">
    <title>LUNAIRE COLLECTIVE: Reviews and photos of Lunaire Collective - News and Reviews</title>
    <!-- InstanceEndEditable -->
    <link href="desktop.css" rel="stylesheet" type="text/css">
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <!-- InstanceBeginEditable name="head" -->
    <script type="text/javascript">
    function MM_setTextOfLayer(objId,x,newText) { //v9.0
      with (document) if (getElementById && ((obj=getElementById(objId))!=null))
        with (obj) innerHTML = unescape(newText);
    </script>
    <!-- InstanceEndEditable -->

  • How to create dom treeof html page with java

    hi, all
    i met with a problem how to create dom tree of html page wih jave, that is, given a html page, how to create a dom tree of this page with java?
    thanks in advance.
    regards
    richard

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How to place a banner in a HTML page with alpha?

    I have multiple ideas/designs which want to work into my new site.
    It utilises designing graphics in AE, exported as .swf that lay on an alpha, building them into my HTML page layout, and once there the alpha/space in the design will enable HTML background elements to show through.
    How do I set this up in AE, HTML or Flash?

    Use swfobject to embed the file within html and select your wmode property to transparent.
    http://www.adobe.com/devnet/flashplayer/articles/swfobject.html

  • How can i use link in report to go to new page with parameters??

    Hello
    I've created a report and have added a link (to a html url) to one of the columns. Whenever i click that column in a row, a new page appears. At this moment this page is static. However, i want to show the details of the selected row in the report. This means that somehow i have to pass a parameter to the second page with the primary key of the selected report row.
    Is there any way to do this?
    Thanx
    Ben

    You can do this using SQL based reports.
    Here is an example
    select ''||empno||'' emplink,ename
    from SCOTT.EMP
    Here the link "http://forums.oracle.com/forums/message.jsp?id=" takes a parameter whose value is the empno.
    In the column formatting section of SQL reports you should display this column as HTML and not TEXT.

Maybe you are looking for

  • Error in starting the database

    when i shut down my database,there is no error but as i startup my database it is giving the following errors ORA-24324: service handle not initialized ORA-01041: internal error. hostdef extension doesn't exist ORA-12514: TNS:listener could not resol

  • Error when updating adobe Indesign cc

    Updated failer Errors encountered during installation (U44M1P7). All other CC apps update successfully.

  • Firefox 3.6.24 did not install. Mac PowerPC shows it IS supported.

    According to Firefox 3.6.24 Release Notes: Operating Systems * Mac OS X 10.4 and later Minimum Hardware * Macintosh computer with an Intel x86 or PowerPC G3, G4, or G5 processor * 128 MB RAM (Recommended: 256 MB RAM or greater) * 200 MB hard drive sp

  • Question on BPM performance

    Hi all We have two source systems and data will be correlated based on filenames. Scenario is working fine when I test with small amount of file. But as per my interface specification, there might be quite big file (around 25mb) file come in a day. T

  • Can't install updates since installing ios6 just says waiting  ipad 3

    Can;t install updates since installing ios6 3 days ago just says waiting ipad 3