Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

blob image

Status
Not open for further replies.

bookouri

IS-IT--Management
Feb 23, 2000
1,464
US
Ive found numerous examples like this for retrieving
images and storing them in blob fields. Every example I find states that this routine (or whatever variation of it is being used) will retrieve the file you select, display it in the data_block.my_image on a developer form and when you commit it, the image will be saved in the table the form is built around... I can NOT get the images to save. I put the code on a button, I click the button, I browse to the image file and click on it. the image is retrieved onto the form, displayed and if I leave the record Oracle asks if I want to save changes. I can browse through other records, load more images, browse more records, if I scroll back to records where I have loaded images, they pop back up on the form... they must be cached somewhere.. because when I exit the form and bring it back up all the images are gone again...they are NOT saved into my base table.. does anyone know why? Ive tried everything I can think of...



DECLARE
v_filename VARCHAR2(255);
BEGIN
v_filename := GET_FILE_NAME ('C:\', NULL, 'Bitmap (*.bmp)|*.bmp|');
IF v_filename is not null then
READ_IMAGE_FILE(v_filename, 'ANY', 'EMP.PHOTO');
END IF;
END;
 
How do you know they are not saed? Do you issue commit_form (from code or by pressing Save button) and receive a message "n records applied and saved"? Is your block based on a table? Regards, Dima
 
Yes I get the message that changes have been saved. The block is based on a table and its the only table in the test form... one simple table last_name, first_name, ID, and photo_data.... any time I do the read_image_file, Oracle "sees" that data has been changed and will tell me if I move off the form... 'do you want to save changes' and I save and oracle responds X number of records saved' but they are not saved to the table...If i go back to the record on the form the image is not there.... the odd thing is that the image stays until I close the form... I can add several employee's images and save them, I can page back and forth between them and the images stay there... but when the form is closed and reopened the images are gone.. there's nothing in the image_data field...

???

 
Did you query the table by sql*plus? What is your Forms version (full number)? Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top