I'm using Apex 24.2.0 on a 21C database. I have an interactive report that display data columns well. I'm also trying to display an image, but I keep getting the error: "ORA-06502: PL/SQL: numeric or value error: character to number conversion error" when the image column is selected.
The SQL for the report is:
select APP_NUM,
APP_NAME,
APP_URL,
APP_IMAGE,
dbms_lob.getlength(app_image) as image_length,
MIME_TYPE
from APP_LIST;
In the APP_LIST table, the column APP_IMAGE is defined as a BLOB. The column APP_ID is a unique PK.
The report's corresponding form page has the APP_IMAGE page item type = Image Upload. The Windows File Manager Properties displays the Type Of File as ‘JPG FIle (.jpg)’. The image was uploaded from a Windows jpg file successfully via the form. On the form screen, a small image appears in the box of the page page item App Image. It also downloads well.
The interactive report column APP_IMAGE has the following attributes:
- Type = Display Image
- Heading = App Image
- Table Owner = Parsing Schema
- Table Name = APP_LIST
- BLOB Column = APP_IMAGE
- Primary Key Column 1 = APP_NUM
- Mime Type Column = MIME_TYPE
- Filename Column = - Select -
- Last Updated Column = -Select -
If I de-select the image column from the interactive report the list shows valid values (e.g. Image Length = 30782, Mime Type = ‘image/jpg’. Once I select the APP_IMAGE column to be displayed in the interactive report, I don't get any report, just the error message mentioned above.
I've read a lot of posts and have double checked everything. The image file opens with several Windows image editors (Paint, Photoshop, etc.) and uploads and downloads fine.
What am I missing?