Populating Image Item

Hello All
I have a form with two items there
1. an image item
2. a button that will open a dialog box to choose a picture from there
what will be the code behind this button?
will the image item be populated with an image having extension other than BMP?
Regards

DECLARE
     tiff_image_dir VARCHAR2(80) := '/usr/staff/photos/';
     photo_filename VARCHAR2(80);
BEGIN
     :System.Message_Level := '25';
     photo_filename := tiff_image_dir||LOWER(:scans.scan)||'.tif';
     READ_IMAGE_FILE(photo_filename, 'TIFF', 'emp.emp_photo');
     IF NOT FORM_SUCCESS THEN
     MESSAGE('This employee does not have a photo on file.');
     END IF;
     :SYSTEM.MESSAGE_LEVEL := '0';
     END;

Similar Messages

  • Problem Populating Image Item From Database

    Hi All,
    I am using Oracle 9i & Forms 6i on Windows platform & working in client/server model. I created a form in which, I am reading an image file from the file system & then saving it into the database. In the Databse, i created the column as BLOB. But, when I query, this does not retrive the saved image in Image Item. But image is actually saved. When I tried, changing the database column to LONG RAW, it is working. I mean its reading the image in the image item from the database.
    Can anyone pls tell me, is there any problem like this, as we can retrive from LONG RAW but not from BLOB, or I am missin something here.
    Regards

    Hi,
    I use Forms 6i to save and retrieve image in BLOB column without problems.
    Some weeks ago, my column was long raw and I update it without problems. Nothing to do in Forms and juste modifiy query and recompile in Reports.

  • Populating Image Item from 9i Database

    Hi All,
    I could store images into 9i database using Forms 6i Application. But I could not populate the stored images using Forms 6i application.
    I appreciate very much for any help.
    Thanks in Advance,
    Umasankar.

    Hi John,
    Sorry for not explaining the problem completely.
    Here is the details.
    We are using Forms 6i and Oracle 8i. We are also planning to upgrade the database to 9i. I have application developed in Forms 6i. Using that application to connect 9i database, I could store images (from client system) into the 9i database (Using read_image_file). When I execute the query from Forms 6i application, I could not see the image from database. I was working OK with images on Oracle 8i database.
    Thanks for your help.
    Umasankar.

  • Loading new xml data into a already xml populated image display

    Hi everybody,
    I have a question about loading new xml data into a already xml populated image gallery.
    So I have my gallery set up so it calls some xml when it first loads. What I would now like to do is load different sets of images via a different xml sheet via the click of a button.
    So for example the loaded gallery already has all thumbs loaded and user can click on them to view the full size image. So next instead of the user having to close this gallery to allow a new gallery to open with a different set of pictures I would just like to have a button. This button will unload the existing thumbs from the gallery and load in new ones from a different xml file.
    If anybody can help me with this it would be great as I am still on a steep learning curve with AS3.
    Here is my AS3
    var xmlPath:String = "pictures.xml";
    var xml:XML;
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    function xmlLoaded(e:Event):void
         if ((e.target as URLLoader) != null )
              xml = new XML(loader.data);
              createMenu();
    var numberOfItems:uint = 0;
    var menuItems:Array = new Array();
    function createMenu():void
              numberOfItems = xml.items.item.length();
         var count:uint = 0;
              for each (var item:XML in xml.items.item)
              var imageLoader=new Loader();
              var menuItem:MenuItem = new MenuItem();
              menuItem.addChild(imageLoader);
              imageLoader.load(new URLRequest(item.url));
              menuItem.linkTo = item.linkTo;
              menuItem.mouseChildren = false;
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              menuItems.push(menuItem);
              addChild(menuItem);
              count++;
    function ***():void
         //menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         for (var i:uint = 0; i < menuItems.length; i++)
              setChildIndex(menuItems[i], i);

    Thanks so much for the reply Andrei1
    I think maybe my lack of knowledge when it comes to AS3 is not helping me at the moment because I thought I understood the code you supplied but there is something not going quite right.
    So I messed around with the code and added the new_loaded_thumbs_btn to load in the "new_pictures.xml" but I am def doing something wrong.
    import flash.ui.ContextMenuItem;
    var xmlPath:String = "pictures.xml";
    var xml:XML;
    var numberOfItems:uint = 0;
    var menuItems:Array = new Array();
    var loader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    loadXML("pictures.xml");
    new_loaded_thumbs_btn.addEventListener(MouseEvent.CLICK, loadXML);
    function loadXML(path:String):void {
         loader.load(new URLRequest("new_pictures.xml"));
    function loadXML(path:String):void {
         loader.load(new URLRequest(path));
    function xmlLoaded(e:Event):void
         xml = new XML(loader.data);
         createMenu();
    function createMenu():void
         clearMenu();
         numberOfItems = xml.items.item.length();
         var count:uint = 0;
         var imageLoader;
         var menuItem:MenuItem;
         for each (var item:XML in xml.items.item)
              imageLoader = Loader();
              menuItem = new MenuItem();
              menuItem.addChild(imageLoader);
              imageLoader.load(new URLRequest(item.url));
              menuItem.linkTo = item.linkTo;
              menuItem.mouseChildren = false;
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              menuItems.push(menuItem);
              addChild(menuItem);
              count++;
         sortChildren();
    // removes previously placed objects
    function clearMenu():void {
         var menuItem:MenuItem;
         while (menuItems.length > 0) {
              menuItem = menuItems[0];
              removeChildAt(getChildIndex(menuItem));
              menuItem.shift();
    function sortChildren():void
         //menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         for (var i:uint = 0; i < menuItems.length; i++)
              setChildIndex(menuItems[i], i);
    When the image display 1st loads it displays the new_pictures.xml thumbs which I thought would load through my new button when clicked.
    And there was me thinking I was getting the hang of AS3.
    Could you please point me in the right direction in what I am doing wrong,
    Thanks for your time and effort in advance

  • Image item in multi-record block - PLEASE SOMEONE HELP !

    Hello everyone.
    I have a multi-record block with an image item that is not in teh table, is populated in the post-query trigger with a read_image_item, from a gif file. This block is child of another block. The problem is that the first records of the block, the ones that fit on the screen, are not showing the image properly, the image appears grey, distorted. In reality, the image dont adjust to the size of the item, as it is especified in the properties. When i scroll down, the rest of records show the image perfect, but this ones still are distorted.
    Forms is 6.0.8.22.1, over oracle 9i. Thank you all in advance.

    hello
    just me what is datatype of ur image record ?

  • Image item in multi-record block

    Hello everyone.
    I have a multi-record block with an image item that is not in teh table, is populated in the post-query trigger with a read_image_item, from a gif file. This block is child of another block. The problem is that the first records of the block, the ones that fit on the screen, are not showing the image properly, the image appears grey, distorted. When i scroll down, the rest of records show the image perfect, but this ones still are distorted.
    Forms is 6.0.8.22.1, over oracle 9i. Thank you all in advance.

    hello
    just me what is datatype of ur image record ?

  • Clipboard paste into Image item un Form 11.1.2

    Hi.
    I need my users Past the image in clipboard directly into an image item
    please you help is greately appreciate
    Thank yoou very much
    Carlos

    You cannot do it with the standard. The image can only be populated via the Webutil CLIENT_READ_IMAGE_FILE() built-in.
    Francois

  • How do you add a link to an image item

    I have added an Image Item to a page and want to be able to add a link to that image but dont see any where you can put the link in the Image Item properties

    One easy way to do this would be to add an image page, upload your image to the page, then create an html portlet with the appropriate tags to refer to the image and your link.

  • Problem w/ image item using 9i BLOB field and InterMedia ORDImage Object

    Hi,dear all,
    I have a problem with image item in Form 6i. Oracle 9i is used as backend DB, and a table contains image data is created for testing:
    create table image_test(
    id number,
    image blob
    In Form 6i, there is no problem to create a block for inserting/updating the image record into the database. However, it can not be used to retrieve image (blob field), the image item remains empty after 'execute query', while the id field can be retrieved. When the same table is created in Oracle 8.1.7, and the exact same form can be used without any problem both in inserting and retrieval. It seems that the Oracle 9i does not use the same way to store BLOB column. Has anybody ever encountered this problem? How to retrieve image (BLOB) in Form 6i from Oracle 9i?
    I tried to use interMedia ORDImage as the data type in Oracle 9i, that is,
    create table image_test(
    id number,
    image ORDSYS.ORDImage
    Same problem, the form can insert record with image, but when retrieving, nothing displayed. Anybody could help! Thanks in advance!

    hi!
    well working with oracle8i and form6i.
    same problem..but i used (instead of blob or clob as datatype..) Long raw..
    it can be saved as usual..i mean Commit..
    and can be retrieved..using Execute_Query..its working fine..
    well if anybody get any other solution..do inform..
    mail_id:
    [email protected]

  • Forms 6i - display into image item picture stored in blob type on database

    hi to all
    i searched on this forum but in don't found solution my problem.
    I created table with a column blob and i design form that insert and display image stored in database ( oracle 9i )
    i used image item type with block database based
    my version forms is
    Forms [32 Bit] Version 6.0.8.13.0 (Production)
    if i define column table like "long raw" it worked but i used blob i insert but i don't display image
    error is:
    ORA-00932: inconsistent datatypes: expected got
    thanks a lot to all
    bye

    I know, that the false forms-version (patch) gives you this errors. Try a newer patchset. For example patch 13-15 (for 9i), or 17 (10g rel. 1)

  • Apex 4.0 display image item :BLOB column returned by SQL statement

    Hello
    I'm creating an display image item in apex 4.0. The source is a BLOB column returned by SQL statement.
    When I'm issuing an sql statement like this:
       select lado.blob_content
       from   large_documents      lado
       ,        large_doc_headers    ladh
       where lado.ladh_nr = ladh.nr
       more criteriait works fine.
    When I create a function inside a package with the same query (in a cursor)
    function get_image(some parameters in) return blob
    Following in apex by:
    select get_image(some parameters) from dualI get a
    ORA-06502: PL/SQL: numeric or value error: character string buffer too smallAnybody any idea why this does not work?
    Regards Erik

    Hi Eric,
    the environment assumes varchar2-output by default, which will be limited to 32767 characters and may have problems with binary formats. You could define a blob-variable to select the value into.
    DECLARE
      l_blob BLOB;
    BEGIN
      SELECT get_image(some parameters)
        INTO l_blob
        FROM dual;
    END;
    /If you expect the BLOB-Content to be text (you should consider CLOB then), you may use UTL_RAW.CAST_TO_VARCHAR2 to convert the content. If your object is larger than the maximum varchar2 size, or you want to convert BLOB to CLOB, you might be interested in some converter like described here: {message:id=559749}
    Hope this is what you were searching for.
    -Udo

  • Problems with image items

    In a form (version 6.0) I have a database block with 3 image items, referencing 3 blobs fields of one record. Three buttons which use read_image_file to read data from a user selected file and put it on every item. It works out when every image item is filled in with every image, or when the form commits with no image items modified, but, if you change for instance only the second image item, it is displayed fine but when the information is retrieved you can see it was saved into de first item!, and the second one is empty, the third one has its valid image. Another example: if the third is changed, it will appear in the first one, the second item remains the same, and then the third one appears to be empty. One more: If the first and third item are modified, then after retrieving the data the first has its image, the second one takes the image from the third one and the third one is empty.
    So, it seems it always “move” the information at commit time from the first item filled in, to the first item not filled in, or to the first item that become empty after another previous “movement”.
    I have tried this with an almost empty form, with no triggers and nothing but the 3 image items, the 3 buttons, and the commit button.
    Can anyone help me please?
    Thanx.
    every button code follows (changing to bImg2 and bImg3 for the other two buttons):
    declare
    path     varchar2(1024);
    begin
         path := get_file_name;
    if path is not null then
         read_image_file (path, null, 'bk.bImg1');
    end if;
    go_item('navigableitem');
    synchronize;
    end;
    the commit button has this:
    commit_form;
    execute_query;
    the block has a fixed default where in order to retreive one record to test all this. As you can see there is nothing else, it is a very simple form.
    :)

    Z, search Metalink for bug 804091. IMAGE ITEMS SAVED TO NEW BLOB COLUMN FOR IMAGE ITEM, QUERIED BACK TO WRONG ITEM.

  • Display PDF in image item

    Hi, all,
    Can pdf display in image item?
    Thanks,
    JY

    hi
    As andreas said u cant see the pdf file as image
    but if u want to see it then u can use adobe reader.
    Because PDF file is not in jpg,gif or in bmp format.
    In Blob column u can store doc,excel,Mp3 songs etc etc but for viewing and for playing u have to use different sofwares.
    I hope its clear now.
    sarah

  • Some JPG images, stored in DB, do not display on screen/image item.

    Hi friends,
    I have a form to save and retrieve images (JPG, GIF, TIF) to and from DB, using WEBUTIL_FILE_TRANSFER.CLIENT_TO_DB and CLIENT_IMAGE.WRITE_IMAGE_FILE respectively.
    It’s working fine, but with few JPG images, it stores in DB but do not display on screen/image item.
    Secondly, if I try to retrieve and write this JPG to OS (using CLIENT_IMAGE.WRITE_IMAGE_FILE), it prompts error “FRM-47101: Cannot write image file”.
    Environment:
    Forms [32 Bit] Version 10.1.2.0.2
    OS XP Pro 2002 SP3
    Oracle DB 11g Enterprise Edition Rel. 11.1.0.7.0 - 64bit
    Any help will be highly appreciated.

    Hi,
    I have done a workaround here, which worked for me.
    My requirement is to direct save images in DB. So my system was just saving images without knowing if picture would display on form or not later.
    I created a (non-DB) image item on form and added a code (CLIENT_IMAGE.READ_IMAGE_FILE) to place image in this image item, if it successfully display image then save image directly in DB using code (WEBUTIL_FILE_TRANSFER.CLIENT_TO_DB).
    Note: - If CLIENT_IMAGE.READ_IMAGE_FILE fails it raises exception and it means image has invalid format/internal data header and system does not save image in DB.
    Now I have a kind of a filter to stop saving pictures which do not display later on form. :)
    Edited by: user12173428 on 29/09/2011 16:38

  • Image Item - Error: bad bind variable

    Hi All,
    I select a Image field from a table and set it to a Image Item in a form 10g. But I have error "Bad bind variable"
    Here is source code in my Post_query trigger:
    SELECT cust_sign INTO :dema_depo.dema_depo_sign
    FROM cust_sign WHERE custcod = :dema_depo.cust_sign_custcod;
    I would like to learn if you have any solution or document to solve my problem.
    Thanks very much for your help!
    BACH

    Dear Sir/Madam,
    I'm reading chapter 16: Working with Images - Oracle Forms Developer's Guide and found that cannot write a SELECT statement to select a a LONG RAW value INTO an image item.
    Thus, any the other way to fetch fr a DB LONG RAW value INTO an image item ???
    Many thanks!
    BACH

Maybe you are looking for

  • HT204291 how can I get my ipad to mirror to apple tv

    they are on the same network. and all appliances have latest software running when I stiwch on the ipad it comes up with the airplay logo and when I click this it shows the apple tv being available, then the top of the screen flashes blue like it is

  • ITunes screensaver shows only a black screen

    After a couple of power outages at home, itunes screensaver just shows a black screen. Love this screensaver and the play option and really miss it. Mac pro Lion 10.7.2 Any tips on repair options?

  • Problem in displaying msg:Concatenate

    Hello Friends, Problem in displaying msg.Following is the code: lv_display = 'This is equipment Number'. CONCATENATE  lv_display  ls_bapi_equip_display-EQUIPMENT into lv_FDisplay . wd_this->DISPLAY_ERROR(     EXPORTING       msg_text = lv_FDisplay   

  • Modifying destination Directory of Application server for Open Hub

    Hi All, i want to load a csv file on application server using Open Hub. when i have created the open hub i have specified the server name, the file name and the directory. but the Basis guys told me that i should use another directory, they have crea

  • IPod folder structure and content doesn't match iTunes Library structure

    My iTunes Library has the following folders: Music Podcasts Audiobooks As expected, the Podcasts folder contains podcasts I have subscribed to, and the Audiobooks folder contains Audiobooks I purchased. So far, so good. However, in addition to CDs I