Check Image Item

Hi everyone,
I have image item as a database item in my forms 6i application, how can I check if the image item is null or not ?? because I have a button for deleting the image, and I want to make this button active only if there is an image in the image item.
IF :Image_Item IS NULL THEN ...... END IF; is not allowed.... any clue??
Thanks a lot
Best Regards,
LoveSoul

Thanks a lot Sarah..
You are right, I wanted to check if image item , it is a database item, have a data (a binary date or picture) or not..but the way you mentioned didn't help cause image item couldn't be treated as text item and cannot be checked by (NULL or NOT NULL) and when I refer image item as the following :
IF :IMAGE_ITEM IS NOT NULL THEN
DO_SOMETHING;
END IF;
Iit gives (bad bind variable 'IMAGE_ITEM') when compiled.
So, I was asking if there is a good way to check for null image item???
Thanks a lot
Best Regards,
LoveSoul

Similar Messages

  • "ImageList1.Images.Item(#) = ImageList2.Images.Item(#)" produces "index" error. Help.

    I have two ListViews, displaying the contents of two ImageLists ("ImageList1" & "ImageList2"):
    (mockup)
    The goal: User checks a box on the left AND a box on the right, replacing the right-checked image with the one on the left.
    My code:
    ImageList1.Images.Item(intLeftChecked) = ImageList2.Images.Item(intRightChecked)
    But when I do this, I get the following runtime error:
    InvalidArgument=Value of '0' is not valid for 'index'.
    The index is not the problem though because:
    ImageList1.Images.Item(1) = ImageList2.Images.Item(1)
    ...gives me: InvalidArgument=Value of '1' is not valid for 'index'.
    This is my first time using the "ImageList" control, so I'm not too familiar with its eccentricities. :(
    Help. Thx.

    You are saying you want to change the image displayed in the listview, but the line
    ImageList1.Images.Item(intLeftChecked) = ImageList2.Images.Item(intRightChecked)
    changes the Imagelist. I would just load the images in the imagelist(s) once, then only change the ImageIndex property of the list item that you want to change.
    In addition, the statement assigns from right to left, not from left to right as you've described.
    How did you add the images to the Imagelists? Did you use the Form designer?
    What do the lines
    debug.print(ImageList1.Images.count)
    debug.print(ImageList2.Images.count)
    output in the output window?
    I'm not even sure whether you need two Imagelists.
    The mockup I used isn't exactly what I'm doing (which is a bit more complex). I was trying to simplify the issue and may have simplified it too much. The "Left = Right" mistake is just my bumbling fingers. :)
    What my app really does is show a fixed number of imageboxes on top (for example: playing cards) and a ListView below showing more images from a different folder (for example: the remaining cards). Both lists load their images directly from the
    computer:
    img = Image.FromFile(strPath & "Save\Card" & Format(intCnt, "00") & ".png")
    Dim myBitmap As New Bitmap(img)
    myThumbnail = myBitmap.GetThumbnailImage(32, 32, myCallback, IntPtr.Zero)
    (I believe you supplied me with that code.)
    The user can then replace one of the checked images above with one of the checked images below.
    This portion of the program works just fine:
    Thumbnails(intChecked).Image = Image.FromFile(strPath & "\Card" & Format(strCheckedItems(intCnt), "00") & ".png")
    ...but that's not enough. If I change the displayed thumbnail, I need to also need to update the "ImageList" so what's stored matches what's displayed on screen.
    ImageList1.Images.count = 80
    ImageList2.Images.count = 1   (correct, I only have one item loaded/displayed in the ListView.)
    I have two ImageLists because users can load in different icons into the "Inactive" window while leaving the "Active" list unchanged. This involves clearing ImageList2 between loads.
    Any idea what I'm doing wrong? Thx.

  • Problems displaying image in image item

    Hi,
    I have some tiff images on filesystem. which i sucessfully loaded into the database and are stored in blob column, thru SQL*Plus. when i tried to view these images in image item on my form, some of them doesn't show up. i checked the the length of the blob column, to see whether the image is actually loaded into the database and i found that the length is greater zero(infact very high). then i tried to load the image, which doesn't show up, from forms by read_image_file, neither it loads the image nor it displays an error.
    iam using oracle8i database and forms6.0.
    any help is greatly appreciated.
    regards,
    Krupal.

    thanx feng,
    i have tried to load the images thru forms into the database by using read_image_file. but some of the images are not showing up in the image item. i seriously doubt there is something wrong with the image file itself. the image files are in tiff format but saved with an extension .000 file for some reasons. now i doubt that all that images are not tiff files, some of them may be of some other type. bcos when i tried to save one of them as a tiff file it took more space than what it was earlier. after saving as tiff file the form loads the image successfully. is there anyway way that i can load the image in whatever form it is? or is there any way to convert automatically these images to tiff format?

  • Preventing disabling of check box - item okay in MIGO

    Dear all,
    In the MIGO transaction - during goods receipt for subcontractor material, when the item (incoming) is checked as item okay - automatically the child material (Material sent to subcontractor) is also activated thereby to enable 543 movement.
    Unfortunately some of the users are disabling the check box (for the material sent to the subcontractor). This prevents depletion of stock from the subcontractor but inflates the stock of the incoming material.
    Is there any way - either by authorisation check to prevent users disabling the check box or other methods?
    Experts suggestion is required in this regard.
    Thanks in advance.
    Regards,
    M.M

    Hi Magesh,
    it is possible. use Badi enhancement
    MB_MIGO_BADI goto
    IF_EX_MB_MIGO_BADI~POST_DOCUMENT
    tell your abaper to put the logic like
    parent ID and subcomponent ID need to select
    if either of two is not selected
    then error message will prompt not to save the GR doc since subcomponent is unselected.
    reference field EKPO check PSTYP
    hope this help you.
    regards,
    Maia
    Edited by: Maia on Apr 18, 2008 3:07 PM

  • How do  we check the check box items based on the databse fields.

    Hi All,
    I have a requirement like as mentioned below#
    1. I have a combox box whcih i will be populated from database.
    2. I have created two check box as "Stategric " and "Non Stategric".
    3. Now when i select the combox box condition i need to select the check box items.
    4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
    5. How do i need to map the database point of view and correlacte with javascript pont of view.
    6. Do we need to write any Application process to achieve this task and who we can do that.
    Thanks,
    Anoo..

    Hi VC,
    As per my understanding the code should be placed between --.
    Based on this i have placed the code
    function setCheckbox(pThis, pItem){
    alert('inside');
        var l_code = '';
        // Get checkbox name
        rName = document.getElementsById('P1_ENG_BAU').firstChild.name;
    alert("The value is"+rName);
        // Fire AJAX
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
        get.add('F120_COMPANY',pThis.value);
        gReturn = get.get('XML');
        if (gReturn) {
          var values = gReturn.getElementsByTagName('value');
          var messages = gReturn.getElementsByTagName('message');
          // Build the checkbox
          for (i=0; i<values.length; i++) {
            var rValue = values.firstChild.nodeValue;
    var rMessage = messages[i].firstChild.nodeValue;
    l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
    l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
    document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
    Correct me if iam understanding is wrong.
    Thanks,
    Anoo..
    Edited by: Anoo on May 31, 2012 11:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 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 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.

  • 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]

  • Cannot open check image in bank account

    Hello,
    I can no longer open my check image on my bank account to view cleared checks. I followed all other options (automatically open, exceptions etc.) I also have lost my yahoo tool bar. I updated my Firefox to 20.0.1 and that solved the problem momentarily but now the problems have returned.
    I also contacted my bank and they see no problems.
    Thank you for your help,
    Tom

    Are this PDF files?
    Current Firefox versions have enabled a built-in PDF Viewer that doesn't have all features that other PDF readers like the Adobe Reader have or may not function properly otherwise.
    You can change the action for Portable Document Format (PDF) from Preview in Firefox to use the Adobe Reader or set to Always Ask in "Firefox > Options/Preferences > Applications".
    You can set the pdfjs.disabled pref to true on the <b>about:config</b> page to disable the build-in PDF viewer.
    You can check the value of the plugin.disable_full_page_plugin_for_types pref on the about:config page and remove the application/pdf part if present or reset the pref to the default via the right-click context menu.
    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them

  • Check on Item Category

    Hello,
    I have a requirement where I need to perform a check on item category for each sales order line item. if the item category is u2018ZTASu2019 then before saving the document the user should be prompted to verify .
    I was thinking to use user exit USEREXIT_SAVE_DOCUMENT_PREPARE. But at this point I will have to loop through entire vbap. This may cause unnecessary load.
    Please let me know what would be the best way to achieve this?
    Thanks in advance.
    K.

    Hi Kathy
    If you Put Error message indicator then you cant save the sales order. So maintain Warning message  indicator . Also maintain Incompletion log as i said in my previous thread then your requirement can be fulfilled
    In the same way with the help of the technical consultant tell them that the message should be different when the warning message comes. Say if the end user is saving the sales order then he should get a message CHECK THE ZTAS  ITEM CATEGORY  IN THE ORDER and still if the end user tries to save the sales order then system should tell to maintain  incompletion log data
    Regards
    Srinath

  • 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

Maybe you are looking for