Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Read Image file from file system.

user9925154Sep 15 2010 — edited Sep 16 2010
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2010
Added on Sep 15 2010
3 comments
4,246 views