3 Replies Latest reply on Nov 9, 2012 11:07 AM by 789736

    Image issue

      Hi guys,

      Im currently having issues with images on Oracle forms 10g. Firstly, I have created a form where I can upload and save an image, when you press the upload button it displays the photo for the user to see, or when querying it will bring back the photos stored on the database. Now, some of these photos display fine but others dont display on the form however if i were to open them and save them(without making a single change) using any program like ms paint the photo displays fine on the form. I have spent ages trying to figure this out and just cant, its not down to size and there doesnt seem to be any obvious differences in the photos which display properly and those which dont.

      As this issue alone was driving me crazy I decided to use a java bean to display my photos as they always seem to display correctly when using a java bean. However, to get them to display in the java bean I need to write the exact sql statement to retrieve the photo, which is fine. I am now running into isses though because the datablock I want to display the photos on is a multi record block and I need the exact id of the photo for my javabean otherwise when it queries the photo it just brings back one of the photos (the multi record function doesnt seem to work for the javabean). Does anyone here know how I would get the id from each of the records in the multi record block?

      For example I can see 3 records on my multi record block, my javabean gets the id of record and fetchs the photo using sql ie select photo from photos where id = ** but I need to get the ids from the other multirecord items, how do I obtain the other ids from the multi record block (its difficult because it is just one item in the datablock and not 3 seperate items).

      Any help on this matter would be GREATLY appreciated.

        • 1. Re: Image issue
          François Degrelle
          <p>Maybe you could inspire from the Multi-record PJC Java Bean.</p>
          1 person found this helpful
          • 2. Re: Image issue
            Two Solutions...

            first Use database block for retrieving/fetching image, display the image item on the canvas, and write code


            on button, for specific image display use the "Where Clause" property of the block. i think this is simple one.

            or Try using Web utility ...
            1 person found this helpful
            • 3. Re: Image issue
              Thanks for the input guys will have to read that link you sent shortly in regards to the second response I cant use the where clause because I cant identify the id of each of the different records in the multi record block because it is all based on one item in the datablock.

              I assume there is no way to distinguish between the different instances of the same item on a multi-record block? for example I have an item on my multirecord block which is a textbox which stores the id I will need to insert into my where clause, however since there are 3 records with this item on my form how do i get the id for each as it can only be referenced as data_block.id. SO on my form 1 item is displayed 3 times due to the fact it is part of a multi record block, so to get the picture to display in my java bean I would need to know the id's in each instance of the textbox but I can only refer to the text box as a single item ie. data_block.id


              Edited by: 786733 on 09-Nov-2012 03:05