Read Image file from file system.
Hello friends,
I am trying to retrieve images from the file system, but the open dialog box is not popping up for me to choose which file i want. It does nothing and gives no error. Just says record 1/1 on the message bar at runtime.
I have two blocks on the module. One is the lobs_table block and the other is the control block. On the control block i have a when-button-pressed trigger on an item. And here is the code below.
Declare
jpg_image_dir VARCHAR2(100) := 'C:\Users\ajayia\Desktop\Me_pics';
photo_filename VARCHAR2(100);
BEGIN
:System.Message_Level := '25';
photo_filename := jpg_image_dir||:LOBS_TABLE.CHAR_CLOB||'.jpg';
READ_IMAGE_FILE(photo_filename, 'JPEG', 'LOBS_TABLE.IMAGE_BLOB');
WRITE_IMAGE_FILE(photo_filename,'JPEG','LOBS_TABLE.IMAGE_BLOB',MAXIMIZE_COMPRESSION,ORIGINAL_DEPTH);
IF NOT FORM_SUCCESS THEN
MESSAGE('SQLERRM: ' || SQLERRM);
--MESSAGE('This employee does not have a photo on file.');
END IF;
:SYSTEM.MESSAGE_LEVEL := '0';
end;
Please help me. I don't know the code to use to get forms to bring up the open dialog box.
Thanks in anticipation.
Cheers
Aj