Alternative method for displaying images blobs stored in DB

I am trying to use an Application Process as a means to displaying images stored in BLOB columns in my table. And it works except for one problem. The code for my on-demand Application Process is below (the name of the application process is OUTPUT_IMAGE):
DECLARE
l_mime VARCHAR2(255);
l_length NUMBER;
l_file_name VARCHAR2(2000);
lob_loc BLOB;
BEGIN
SELECT photo_mime_type,
photo_blob,
photo_filename,
dbms_lob.getlength(photo_blob)
INTO l_mime,
lob_loc,
l_file_name,
l_length
FROM persons
WHERE id = <b>260</b>;
owa_util.mime_header(nvl(l_mime,'application/octet'), FALSE);
htp.p('Content-length: ' || l_length);
htp.p('Content-Disposition: filename="' || l_file_name || '"');
owa_util.http_header_close;
wpg_docload.download_file(lob_loc);
END;
I can then create HTML like:
&lt;img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE"&gt;
Which works nicely.
The question/problem is: How can I pass the ID of the record (whose BLOB I want to display) to the Application Process? (In the code above you'll see the value of <b>260</b> is currently hard coded). I thought about tacking on something like "&my_id=xxx' to the end of the URL but doing so prevents the Application Process from even running.<BR/><BR/>
All comments/suggestions much appreciated,<BR/><BR/>
Thanks,
<BR/>
Andy

Andrew,
The URL for an Application Process uses the standard f?p syntax.
Try passing your value like this:
< img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE:NO::MY_ID:[the value to send]"> You would need to have an item called MY_ID.
Your query could then refer to it as
WHERE id = :MY_ID;
Doug

Similar Messages

  • How to Display IMAGE BLOB stored in a table in a html region APEX

    Need to know how to display an image stored in a table in a HTML APEX Region.
    Please

    Hi
    Please explain what you mean by it doesn't work?
    Are there errors messages, at what point, how far did you get and exactly what did you do????
    Please provide more information.
    Thanks
    Ben

  • Is there any alternative method for GET_FRONTEND_FIELDCATALOG in CL_GUI_ALV

    Hi all,
    Please let me know if there is any alternative method for GET_FRONTEND_FIELDCATALOG (CL_GUI_ALV_GRID class) in the class CL_SALV* family. I need to capture the field catalog(Or list of fields) of the current output list.
    I have saved many layouts on my ALV output with different combinations of fields, When I select one layout and click on the custom button it should process only the fields displayed on ALV.Please let me know how do I get the fields displayed on ALV using CL_SALV_* family classes.
    Thanks,
    Prathap

    Hi,
    Check this link...[Setting up Layout|http://help-abap.blogspot.com/2008/09/salv-model-4-setting-up-layout.html]

  • Alternative method for loadObjectLibrary()

    Hi,
    Iam new commer to this openscript.Urgent.. Please any one help me which one is the alternative method for loadObjectLibrary() in openscript9.2.

    Termination
    Set Up Personnel Actions
    Create reasons for Personnel Actions
    Define Action Type for Termination
    Define Infogroups
    Determine Periods of Notice
    Before making the settings in feature 40TRM, you must set the same Action Type for the Action
    Reasons N0, N1 and N2 in the table view Reason for Action (V_T530).
    you can use IMG link under Payroll India -> Termination -> Create reasons for Personnel Actions.
    For example- if 40TRM return value is 10 then there shud be action reasons N0, N1, N2 for the Action 10 in V_T530.
    well 1 more thing, enter the pernr in termination workbench and press ENTER then try to check F4 of 'Reason'.
    I know it looks funny but as the pernr is mandatory field there, you need to press 'Enter' after this.
    Determine Deadline Type
    Maintain Calculation Factor for Retiral Benefits
    Calculation method for Notice Pay
    Try this hope u have maintained the Gratutiy configuration correctly

  • Essential PL/SQL , Java Classes/Methods for working on BLOB

    &#61623; Are there any methods/procedures with which we could work on a BLOB object which contains purely text?
    &#61623; Essential PL/SQL , Java Classes/Methods for working on BLOB:
    null

    &#61623; Are there any methods/procedures with which we could work on a BLOB object which contains purely text?
    &#61623; Essential PL/SQL , Java Classes/Methods for working on BLOB:
    null

  • Af:commandImageLink not processing the aboulite path for displaying image

    All,
    We are required to display an image in the UI. The image is not stored in the deployed ear file. It is stored in the "*<DOMAIN_HOME>\Inventory\images*".
    Where DOMAIN_HOME=D:\JUPITER_CORONA\system11.1.1.3.37.56.60\DefaultDomain\inventory
    I would process an image absolute path in the af:commandImageLink tag as follows,
    *<af:commandImageLink "icon=file://D:/JUPITER_CORONA/system11.1.1.3.37.56.60/DefaultDomain/inventory/images/equipment.png" text"equipment" shotdesc="icon" />*
    The problem is that the above tag is not processing the above mentioned absolute path and displaying text "icon" instead of actual icon image. As per the ADF documentation the tag processes absolute path as well.
    Can someone suggest as to where I am going missing.
    regards,
    Chandra

    I was not able to get what you want very well, the situation is a little bit un-usual,
    but for solution I suggest the below way.
    write a servlet/JSP that return the image (it is like copying the file, read the image from absolute path and send it to the OUTPUTSTREAM of the response aslo remember the MIME and the write filter for the jsp/servlet that end with .jpg or any extension for the image.)
    then in the jsf page write the below code.
    <af:commandImageLink icon="/jspOrservlerpath/servlet/filename.jpg" text"equipment" shotdesc="icon" />
    your servlet (get the filename.jpg and then find the file and return it)
    this solution is very common for cases that the file is not available physically such as when you want to read it from another place(your case) or database.
    I hope this help you.
    I can send you the source for the servlet/jsp if you want.

  • How can I restore the background color Firefox 13 used for displaying images?

    I preferred the darker background color introduced in Firefox 13 for when images were displayed standalone, as opposed to the glaring white. How can I restore that behavior?

    That should still happen.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can also check for a userChrome.css file with code to change the background color.
    The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.
    *http://kb.mozillazine.org/Editing_configuration

  • Problem for displaying image in jsp

    I like to retrieve and display image from database in jsp file. Now, image has been retrieved and store in session. But it cannot be displayed in jsp. Who can help me? Thanks a lot!
    Codes like below:
    <%
    byte[] b = (byte[])session.getAttribute("sessionName");
    System.out.println(b.length); //the length can be printed at console successfully
    if(b != null) {
    response.setContentType("image/*");
    OutputStream toClient=response.getOutputStream();
    toClient.write(b);
    toClient.flush();
    toClient.close();
    %>

    JSP is designed to return text/html documents.
    As such it automatically calls getWriter() to return a character stream. (places it in the implicit variable "out"
    Seeing as you want to return bytes, instead of character data, the JSP technology is not applicable
    Calling getOutputStream after getWriter has been called results in an IllegalStateException
    So calling getOutputStream in a JSP will ALWAYS throw an exception.
    Cheers,
    evnafets

  • Better zoom method for viewing image

    Why can't they have the same type system as in Elements or full ps? Control + or - to change size and smaller jumps in size. And keep the same style slider thingy in both develop and library modules.
    And of course ability to separate panels on another monitor. Image size is EVERYTHING when you're trying to make adjustments.

    Ctrl + and = (which has - on it also) zoom in and out through the 4 zoom levels visible in the Navigator. If you require the final zoom to be larger than the default 2:1, then select it from the dropdown and LR remembers this for the final zoom..
    As to the difference between Quick Develop and Develop, Quick Develop does RELATIVE adjustments, which are there for quick settings. It's useful for brightening images which have different exposure settings for example, where doing the same in Develop would force them all to the same ABSOLUTE value. The idea is to use it to help get to the Pick files quickly before Developing these files. There's no sense in developing 1000 files when you ultimately will only bring 10-20 top quality ones out at the end.
    As to image size, Try Tab and Shift TAB.

  • Alternative method for location.reload()

    Hi,
    Can anyone suggest what is the alternate method compatible both in IE as well as Netscape for location.reload() to reload a frame?I tried using history.reload() but it doesn't work!!!

    Termination
    Set Up Personnel Actions
    Create reasons for Personnel Actions
    Define Action Type for Termination
    Define Infogroups
    Determine Periods of Notice
    Before making the settings in feature 40TRM, you must set the same Action Type for the Action
    Reasons N0, N1 and N2 in the table view Reason for Action (V_T530).
    you can use IMG link under Payroll India -> Termination -> Create reasons for Personnel Actions.
    For example- if 40TRM return value is 10 then there shud be action reasons N0, N1, N2 for the Action 10 in V_T530.
    well 1 more thing, enter the pernr in termination workbench and press ENTER then try to check F4 of 'Reason'.
    I know it looks funny but as the pernr is mandatory field there, you need to press 'Enter' after this.
    Determine Deadline Type
    Maintain Calculation Factor for Retiral Benefits
    Calculation method for Notice Pay
    Try this hope u have maintained the Gratutiy configuration correctly

  • Urgent ! Code for Displaying Image from Oracle BLOB image on VB Form

    Hi Plz any one have any work to showing a Picuture on Visual Basic Form, i Save the Picure in table and its column type is BLOB where i save picture, now i want to show it on VB form. if anybody knows plz tell me. and if image not found then how can i handle in nvl(field,' ') function.

    Refer VB sample on Passing LOB parameters to a stored procedure. It shows how to display and insert the image from VB form to an Oracle Database in a BLOB column.
    http://otn.oracle.com/sample_code/tech/windows/ole_db/oledb8/content.html
    Chandar

  • Alternative ways of displaying image from database?

    hi - I'm working with some legacy/inherited/already-written Forms that just use block triggers to 'select values into :Fields..' to populate the text boxes on the canvas.
    Whenever I've managed to display db-based images before, it's always been on blocks that are based just on the table, and Forms shows the image okay.
    These forms I'm using at the moment though aren't based on tables, they just get populated from the trigger.
    I don't believe you can select into a blob/image, or at least I haven't been able to get that to work.
    Are there any alternative ways of populating an image place-holder, with a blob field from the database? (other than using a table-based block)??
    thanks.

    May be you can separate the image item to a DB block with primary key of the table and create a relation between two blocks. So when the first block is populated through trigger, it would fetch the image on 2nd block automatically.

  • Alternative methods for checking battery health

    Model: 8922-A26, 3000 C200
    So in the process of trying my hardest to keep a recalcetrant C200 from it's sixth visit to the service centre in less than 11 months of ownership, I am trying to see if there's anything I can do to improve its battery life beyond the pitiful 30min i'm currently getting.
    Being a longtime thinkpad customer, I tried all the usual methods including the three-cycle power down and drain trick to recondition the battery, with no solution and ran through all the possible solutions in MIGR-63114 to no success at all.
    Except one - verify the health of the unit's battery, an online tool which uses ActiveX applets to work some black magic and tell you if it's pooped or not. However, it seems this tool is broken.
    It's not working in either IE6 or 7, and despite prompting you to install all the AX components nothing ever happens no matter how long you leave it. And if sitting around isn't good enough for you, you can stare at the broken image which is supposed to be a progress bar.
    Does anyone have any alternative ways of checking the battery health on a C200 or firing off some reconditioning tools to save me being another week without this unit? I don't mind dealing with the phone support group, but i'll be darned if I let the service techs near the unit again because I just know my luck will see them fix or replace the wrong part - for the third time in a row.
    Michael Harris
    "Call the spirits, ask them to bring pizza"

    I don't believe there is a way but more than likely an Apple Store can check it if there is one nearby.
    I've seen a post or two here reporting the same and the solution provided (which claimed to help) was using the iPhone until the battery is depleted causing the iPhone to turn off. Plug it in and allow it to charge completely.
    And if you haven't already done so, it can't hurt to Reset and/or Restore your iPhone.

  • How to use boimage url for displaying images

    I am trying to test the Image URL feature in a Web Intelligence report.
    I have a few images loaded in the images folder on the installation server.
    I made the text of a cell: boimage://auditingBOBJLogo.png
    No images are showing up. When I am in view mode a box with an x shows.
    I am using the Web Client to edit the report and view it in InfoView.
    Any tips or best practices for getting this to work would be appreciated.
    Thanks

    Hi,
    Make sure that you have placed the image files in correct folder.
    And the cell formula is boimg://auditingBOBJLogo.png and not boimage://auditingBOBJLogo.png.
    Remember to set the display property of the cell to Image URL.
    Regards

  • Desperately seeking help for displaying image on button

    i wrote the following method to create and display a button with an icon, doesn't work and i cannot figure out what the problem might be and how to fix it, please help me...
    clo :))
    public static void addButton(Container c, String title,
    ActionListener listener)
    JButton button = new JButton(title);
    button.setBorder(null);
    button.setFocusPainted(false);
    button.setBorderPainted(false);
    button.setContentAreaFilled(false);
    ImageIcon icon = new ImageIcon("anImage.jpg");
    button.setIcon(icon);
    c.add(button);
    button.addActionListener(listener);
    the parameter c is of JPanel type and gets added to a JFrame object,
    the source compiles and runs but i see no image on my button, sigh :((!
    PS(the image file is placed in the same dir as the source file).

    Why buttons and labels might not show up the icon?
    Either your image is not in the classpath and you are trying to load it as a resource: see
    http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html
    or you are running the java machine from a different directory that you expect it does.
    or the file doesn't exist.
    To prove that the system cannot load the image use the example in the above link and the url will be null.
    URL iconURL = ClassLoader.getSystemResource("anImage.jpg");

Maybe you are looking for

  • How can I open .chm files in Firefox?

    I'm trying to open a .chm file in Firefox. I've read that this is possible -- ultimately, I want to save the content out as something more accessible. But whether I right-click the .chm file in Windows Explorer, and use "Open with ... Firefox", or us

  • Prob.. in screen painter fields....plz helppppppppppp....

    Hi I have made a screen in which i have placed a tabstrip. tabstrip contains 3 subscreens. on first subscreen i am giving 2 integer values and on the second i am selecting an arithmetic operation (like add,sub,mul,div) and on the third subscreen i am

  • Keynote quit unexpectedly, lost all my work...

    Keynote quit unexpectedly while I was working on a presentation. I lost a lot of work. Is there any way I can recover some or all of the work?

  • Allow dashboard to be accessed by users with no access rights to the plateform

    There are some users which would like to access a specific dashboard without having access rights to the platform, and we are searching for a solution. What we want is a scheduled job that would update the dashboard data or make the dashboard accessi

  • No sound from center speaker

    hello all,i have a inspire 5.1 5200 speaker system. i am getting sound from all speakers except center speaker. the speaker itself is working because i connected it to the right fromt location and got sound out of the speaker. any help with this matt