1 person found this helpful
See page 3 of the Sample Database Application.
1 person found this helpful
The table/view that you are using for the Interactive Report needs have the BLOB column for the actual image and another column that contains the size.
You will SELECT the size column, but, you will FORMAT it as a BLOB. (basically, it is point-click-choose column name, etc.-> APPLY CHANGES -> done)
example on apex.oracle.com: (name/passwd === demo/demo)
sql for the report:
select IMAGE_TABLE.IMG_ID as IMG_ID,
IMAGE_TABLE.IMAGE_NAME as IMAGE_NAME,
DBMS_LOb.getLength(image_thumbnail) as IMAGE
from IMAGE_TABLE IMAGE_TABLE
thanks a lot. You say that i need the size-column. But where do i get this one? I transfer only the blob column, when i transfer the image to the ActiveDirectory. So i only get the Blob column, when i retrieve the AD about the thumbnailPhoto Attribute. Or am i wrong?
DBMS_LOB.getLength() will return the size of the LOB (blob or clob).
I only know how to show images that are stored in a table (or exposed within a view).
I don't know how you are showing the results from AD within APEX.
first, i want to thank you for your help. I can use the dbms_lob.getLength() function in my pl/sql code, but it returns an integer, right? Do i save it as a number in my table?
You can save it as a number in the same table you store the image.
Or, you could use it in the SELECT clause you used for the report.
(see my SELECT statement above.)
your select-statement works, but when i change the report attributes of the column IMAGE (change to BLOB Format) i get the error message, that no data were found (ORA-01403). It is the same table of the select statement, how is this possible?
When do you get the error?
Double check that the PK column name is set correctly for the BLOB format.
Only other thing I can think of would be: You don't have an image in that column
add another column that checks if you have a NULL value
eg: decode( image_column, null, 'No Image', 'Image') as check_existence
Remove the BLOB format and look for images of length=0
Other than that, you'll have to reproduce the problem on apex.oracle.com (unless someone else has ran into this issue before)
the error displayed when i start the apex application, but only when i change the BLOB-IMAGE column to display the image instead of the length. If i only display the result of the select statement, i get no error.
Maybe there is a problem with the PK.. i have got an ID column, which i set as PK. This is my first time working with a DB and Apex, so maybe there is a high possibility, that i made a mistake.
If i hide the IMAGE column (the original size column), the table ist displayed in the application. If i change the format to DOWNLOAD, i get the same error message to.