PL/SQL portlet with images

We use a Portal Form to load images into the database. The field in the database is a BLOB. We do not know how to display the imagefield in PL/SQL. Can anyone explain to us how we can solve this problem?
Lene & Anniken :o)

procedure query_row(p_empno in varchar2 default null)
is
l_size integer;
l_imedia ordsys.ordimage;
l_tmpblob blob;
begin
htp.init;
select emp_image into l_imedia
from imedia.imtest1 where
empno = p_empno;
if l_imedia.islocal() then
owa_util.mime_header(l_imedia.getmimetype(),false,null);
htp.p('Pragma : no-cache');
htp.p('Cache-control: no-cache');
htp.p('Expires: Thu, 01 Jan 1970 12:00:00 GMT');
htp.p('Content-length: '||l_imedia.getcontentlength());
owa_util.http_header_close;
dbms_lob.createtemporary(l_tmpblob,true);
dbms_lob.copy(l_tmpblob,l_imedia.getcontent(),l_imedia.getcontentlength(),1,1);
wpg_docload.download_file(l_tmpblob);
dbms_lob.freetemporary(l_tmpblob);
else
owa_util.mime_header('text/html',false);
htp.p('Content-length: 0');
owa_util.http_header_close;
end if;
end query_row;
This example retrieves data from ordsys.ordimage datatype.
But if you are storing the data in blob, alter the above code something like the following :
wpg_docload.download_file(<blob_content>)

Similar Messages

  • PL/SQL Portlet with edit defaults. HOW ???

    Hi !
    I created a pl/sql portlet that renders html. Now I want a customization option on the "Edit Defaults" page of the portlet. How do I do this ??
    In the code of the portlet I set "l_portlet.has_show_edit_defaults" to true. So the Edit Defaults page is show, but it's empty.
    On that page I want a variable where you can choose between 3 options. In the procedure where I render the html, I want to read this variable so I can render 3 different things.
    Can someone please help me ?

    I suggest you look at the database services provider in the PDK which is an example provider showing how to do the basic things within a provider/portlet - like customise and edit defaults.
    You could also generate a provider using the pl/sql generator - that will produce code that you can use as a starting point for your development.
    Basically you have to add code to the show procedure of the portlet to render a different page if the mode is 'MODE_SHOW_EDIT_DEFAULTS'. Look in the samples - it should be clear.
    Hope this helps.

  • Building portlets with PL/SQl vs java

    Hi
    We are planing to use oracle 9iAS application server(Enterprise version)to build portal application.
    Can someone suggest me which one should i use, building portlets with j2ee or building portlets with PL/SQL.
    what are the advantages of web providers over database providers?which one is the best way of building portlets.

    Hello
    I've been using Portal for years now, and I'm still developping in PL/SQL. It's very simple and quick to developp. I'm even not using any database providers, I'm just invoking my procedures via their URLs with some Ajax hidden components, and I could developp some screens like employees vacations managements, trombinoscope, portal statistics, etc ...
    I learnt at Oracle how to developp some "true" portlets with DB providers but it's not usefull for me at this time as I don't need portlet customization etc.
    BUT
    if I had to developp a really big project with several developpers I would use DB providers.
    And maybe I would use Java but it takes rather long time to be efficient with this language and it needs to be a realy big project for I start using this language. And as explained above Java offers more compatibility with 3rd party products.
    And last but not least, one has to know what Oracle is more and more dealing with Java, the next 11g version that has just released is much more using Java than 10g does, and that's true for every Oracle products.
    So it's just a matter of skill and time.
    A.

  • Templates with pl/sql portlets

    We plan to have several custom pl/sql providers. What do we have to do if we want to use templates and styles with our custom portlets?

    Nilay,
    PL/SQL portlets can (and should) utilize the wwui_api_portlet user interface portlet API package to render the portlet content. For additional font classes (not availble through the API) you can simply generate the appropriate HTML output using PL/SQL Web Toolkit (htp.p).

  • Problem with public pages having PL/SQL portlets

    I am having problem with a public page which has PL/SQL portlets.
    When I try to access that page without doing login, it displays everything but the portlets which are database driven.
    Is this the way this public page should behave?
    Is there anyway by which I can display data to my public pages from PL/SQL portlets without doing login?
    FYI PL/SQL portlets are in portal30 schema.

    Yes, it has is_runnable function and it looks like this :
    function is_runnable
    p_provider_id in integer
    ,p_reference_path in varchar2
    return boolean
    is
    begin
    If p_reference_path is null the caller may be the provider
    framework (i.e. the Refresh operation of the Portlet
    Repository).
    if (p_reference_path is null) then
    The following if statement is the security mechanism that
    the portlet implements. It does not have any other semantic
    meaning. Any portlet is expected to implement their own
    security mechanism.
    This security mechanism checks if the current user is logged
    on or just accessing the portal through the public account.
    if (wwctx_api.is_logged_on) then
    return true;
    else
    return false;
    end if;
    else
    If p_reference_path is not null the caller makes this call as
    a security check against the portlet instance.
    The security mechanism implemented by this portlet for portlet
    instances is null so true is returned. Returning this value
    indicates that all users have access to this portlet instance.
    return true;
    end if;
    end is_runnable;
    +++++++++++++++++++++++++++++++++++++++++++
    What should I need to change with that function? And what exactly is its use?
    FYI : The code which I wrote for my portlet is by doing some modification in downloaded service portlet. But I have not altered is_runaable function.

  • Content-based image retrieval with SQL/MM Still Image

    Hi
    With ORDIMage signature matching being deprecated in 11g, does anyone have any experience of performing content based image retrieval with SQL/MM Still Image?
    Thanks
    Brian

    The details in that thread is the only information that can be shared.
    Melli
    Oracle Multimedia

  • How to Display RTF data with images from SQL database in Crystal Report

    I am using Crystal report in my WPF application, I have generate Question Paper Report, in which have Question with images. Question with images are stored in SQL Server in rtf format, I want to generate Question report with RTF Text and Images in report

    Hello Sir,
    I am still Facing problem in Crystal report generation with RTF Data (Text + Images),
    I am storing Questions in SQL Server which are RTF Format, Questions have Text + Images..
    I changed field data type then also i didn't get image in Crystal report
    if i browse an image n stored that in DB then its displaying in Crystal report, but when i pasted that image in RichTextBox and saved that in DB then no data displayed in Crystal report.
    My Table Structure is
    Table Name: tblQuestions
    field :    Questions Varbinary(max)
    I tried with nvarchar(max) also but its aslo not working

  • ESI with pl/sql portlets

    Is it possible to use ESI within pl/sql portlets?
    The idea being to only re-execute the query and redraw the resulting HTML rather than re-load the whole portlet.
    Any ideas ?

    Not sure. I'll look into it. In the meantime, you may get a faster response if you repost your question to the Portal Caching forum. A lot more Portal expertise there.

  • Sample  PL/SQL Portlet Source Code for Oracle Portal 9ias

    Hi, I'm a newbie of Oracle Portal technology, and I have a problem:
    I would create a PL/SQL portlet that realizes the following functions:
    1) Retrieve the username of the portal user logged from WWCTX_API.GET_USER function.
    2) Insert into an oracle db table two values about two hidden fields in the HTML FORM of the portlet.
    3) Realize the insert commit through the click on the submit button on the Html form of the portlet. I would redirect by the same button to an other page url also.
    I've never developed in Portal, and may be useful if someone could post me the source code of the SHOW MODE SECTION in the PROCEDURE SHOW of a SAMPLE PL/SQL PORTLET that realizes the upper functions.
    Thanks a lot....

    Hi
    Here's the code from Helloworld_Portlet example:
    procedure show
    p_portlet_record wwpro_api_provider.portlet_runtime_record
    is
    l_portlet wwpro_api_provider.portlet_record;
    begin
    if (not is_runnable(
    p_provider_id => p_portlet_record.provider_id
    ,p_reference_path => p_portlet_record.reference_path)
    ) then
    raise wwpro_api_provider.PORTLET_SECURITY_EXCEPTION;
    end if;
    Retrieve the portlet information.
    l_portlet := get_portlet_info(
    p_provider_id => p_portlet_record.provider_id
    ,p_language => p_portlet_record.language
    if (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW) then
    if (p_portlet_record.has_title_region) then
    Draw the portlet header and specify what links are available
    from that header (i.e. details, customize, help, and about).
    The has_title property is set at the page region level.
    wwui_api_portlet.draw_portlet_header
    p_provider_id => p_portlet_record.provider_id
    ,p_portlet_id => p_portlet_record.portlet_id
    ,p_title => l_portlet.title
    ,p_has_details => true
    ,p_has_edit => true
    ,p_has_help => true
    ,p_has_about => true
    ,p_referencepath => p_portlet_record.reference_path
    ,p_back_url => p_portlet_record.page_url
    end if;
    Draw the portlet borders.
    The has_border property is set at the page region level.
    wwui_api_portlet.open_portlet(p_portlet_record.has_border);
    Display the content of the portlet in the show mode.
    Use the wwui_api_portlet.portlet_text() API when
    generating the content of the portlet so that the
    output uses the portlet CSS.
    htp.p(wwui_api_portlet.portlet_text(
    p_string => 'Hello World - Mode Show'
    ,p_level => 1
    if (p_portlet_record.has_border) then
    wwui_api_portlet.close_portlet;
    end if;
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_ABOUT) then
    Display the about page for the portlet.
    htp.p('Hello World - Mode Show About');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT) then
    Display the edit page for the portlet.
    htp.p('Hello World - Mode Show Edit');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_HELP) then
    Display the help page for the portlet.
    htp.p('Hello World - Mode Show Help');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT_DEFAULTS) then
    Display the edit defaults page for the portlet.
    htp.p('Hello World - Mode Edit Defaults');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_DETAILS) then
    Display the details page for the portlet.
    htp.p('Hello World - Mode Show Details');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_PREVIEW) then
    Display the preview page for the portlet.
    htp.p('Hello World - Mode Show Preview');
    end if;
    end show;
    I think you need to add this:
    You can get the values of your html-form with this command:
    v_hidden_1 varchar2(256);
    v_hidden_2 varchar2(256);
    v_hidden_1 := wwpro_api_parameters.get_value('name_of_hidden_1_in_html_form','p');
    v_hidden_2 := wwpro_api_parameters.get_value('name_of_hidden_2_in_html_form','p');
    You can get the actual URL with this command:
    v_url := p_portlet_record.page_url;
    Hope that helps.
    Regards,
    Mark

  • Keeping pl/sql portlets state...

    Hi!
    I'll keep this as short as possible :)
    On my Portal I have one pl/sql menu/navigation-portlet and one or more java portlets.
    The menu portlet expands end extracts depending on where you click.
    The menu knows its own state (the way it is extracted) by posting parameters (id's) whenever it's clicked on.
    Url example:
    http://host/portal/page?_pageid=35,66260&_dad=portal&_schema=PORTAL&menu.id=111&menu.p_id=222
    By getting the parameters above the menu can restore/reload its own state.
    Now to my problem:
    When the user navigates to a page where I have a java portlet, the menu is extracted a certain way.
    My javaportlet has navigation on itself.
    When the user navigates by clicking a link on the java portlet the menuparameters are lost because the javaportlet can't see them, thereby the menus state is lost and "closed".
    I find it very awkward/clumsy to put "menulogic" on all portlets in order to be able to keep the state of the menu.
    The menuparameters must always be present somehow so that the menu knows how to restore its state!!!
    Public parameters perhaps? (how do I make the parameters public for a pl/sql portlet?)
    Any hints on how to solve this?

    You would need to generate MobileXML from the portlet if it has to work with mobile devices. There is no automatic conversion from a regular portlet to a mobile portlet simply because the layout issues are vastly different on each mobile browser. However, you would only need to specify content in MobileXML once and this should work with most mobile browsers including WAP/WML, CHTML, TinyHTML etc. and cover most devices including PocketPC, Palm, Symbian etc. For the exact details of mobile-enabling a portlet, please refer to the Portal documentation. For advanced details on writing content for a mobile portlet, please see the wireless developer's guide.
    Regards,
    Deepak

  • PL/SQL Portlets accessed through WAP

    Hi,
    we have developed some PL/SQL portlets (using portal 10g version 9.0.4.0.99) which needs to be accessed in a WAP enabled mobile. need some documents or references for the same.
    Thanks
    Ramya

    You would need to generate MobileXML from the portlet if it has to work with mobile devices. There is no automatic conversion from a regular portlet to a mobile portlet simply because the layout issues are vastly different on each mobile browser. However, you would only need to specify content in MobileXML once and this should work with most mobile browsers including WAP/WML, CHTML, TinyHTML etc. and cover most devices including PocketPC, Palm, Symbian etc. For the exact details of mobile-enabling a portlet, please refer to the Portal documentation. For advanced details on writing content for a mobile portlet, please see the wireless developer's guide.
    Regards,
    Deepak

  • How I save a 1D-folat array to MS Sql Server"s image field?

    How I save a 1D-folat array to MS Sql Server"s image field?
    I try.
    First all I flat the array.
    Then I insert the flated string into the table.It 's OK.
    I read it from the table.
    There is a error.
    The field data is empty.
    why?
    Attachments:
    01.vi ‏51 KB

    TimeWaveZero wrote:
    Just use the Array to spreadsheet string and insert the array, then retrieve with Spreadsheet string to array. 
    This is a lossy conversion that does not allow recovery of the identical DBL array due to limitations in the decimal formatting. Not the same! It is also significantly less efficient.
    LabVIEW Champion . Do more with less code and in less time .

  • SQL Portlets - Executing across db link from app server db to DataWarehouse

    Hi
    We are using Ora App Server 10.2.
    Discoverer Portlets saved on app server db, execute their SQL direct to our DataWarehouse (Oracle 9r2) and this works fine.
    However, when we use SQL portlets, the SQL has to be coded with db links from our app server db to our Datawarehouse. This is not ideal.
    Does any know how you can use SQL Portlets without using db links?
    Thanks
    Colm

    Try creating your portlets as java providers using jdbc instead of in PL/SQL.
    Cheers,
    Mick.

  • How to perform Steps to integrate AXL SQL Toolkit with CUCM

    Steps to integrate AXL SQL Toolkit with CUCM

    Here you go:
    https://www.google.com/search?q=javasqltoolkit+site%3Anetcraftsmen.net&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#q=java+sql+toolkit+site:netcraftsmen.net&rls=org.mozilla:en-US:official&safe=images&spell=1
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • Open a Form in a popup window from a PL/SQL portlet

    Hi,
    I have a form that I want to open in a popup window from a URL in a PL/SQL portlet. What is the easiest way to do this? Are there any examples in here or on Metalink as to how to achieve this?
    Thanks,
    Steve West

    Is it a HTML page somewhere on a server with a HTML form on it? You can use javascript tags in ur link to do this maybe?
    javascript:window.open('http://<server name>/page.htm','mywindow','width=400,height=200')
    Obviously if this is a portal form you can also link directly to the show procedure no problems.

Maybe you are looking for

  • How to execute  the CONNECT command in sql

    Hi , I am using DB2 database and I need to execute the sql statement CONNECT TO Database user username USING password. Can anyone tell me how to execute this query in java. I tried this by using executeQuery but it was giving a sexception somtehing a

  • Authorisation to create material master based on material type

    Hello MM Gurus,         How to create user authorisation to create material master on the basis of material type i.e. some are authorised to create material master with material type ROH only and some are authorised to create material master with mat

  • OIA 11g + OIM 10g

    Hi, We are trying to integrate OIA 11g with OIM 10g (9.1.0.2 BP 13) using depricated method, we have copied all required jars to <RBACX_HOME>/WEB-INF/lib including iam-platform-utils.jar and wlfullclient.jar from 11g. During Provisioning server confi

  • Why can't I open iTunes and App Store on my brand new iPad mini.

    Why can't I open iTunes and App Store on my brand new iPad mini.

  • Cannot download ITunes after un-installing it

    I could not get ITunes to "acknowledge" my IPad or IPhone or IPod so when looking for advice on the forum, it was suggested to un-install ITunes and then re-install it. I am having difficulty as it will now not re-install.... I noticed that when un-i