reading image in oracle form

i have oracle form
text item << s_item
when i type item code , it show me some information of the item
i added image item to the form to display image of the item
i put the images "jpg" format under one folder  "item_photo"
but not all items has image
i want to display image item when i type item code in s_item
to avoid item not found
i created this function as i found
  l_file := UTL_FILE.FOPEN(SUBSTR( p_fname, 1, instr(p_fname,'/',-1) ),
                           SUBSTR( p_fname, instr( p_fname, '/', -1)+1 ), 'r' );   
  UTL_FILE.FCLOSE( l_file );

Open in new window

then when validate item of s_item i added this code
IF ( file_exists( 'j:\Item_Photo\71030126.jpeg' ) ) then
end if

Open in new window

but image not found as per the message
(the image is exist in the image folder)
i tried also to change from jpeg to jpg
but same error
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
Not sure if this is problem still exists in your Forms version but there appears to be different types of JPEG and what Forms supports:
NiceMan331Author Commented:
so , you mean i have to convert the photos to JFIF ?
slightwv (䄆 Netminder) Commented:
I'm really not saying anything.  Just pointing out that older versions of Forms would not handle all types of JPEG images.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

NiceMan331Author Commented:
I'm using forms 6i , what is your advice now ?
slightwv (䄆 Netminder) Commented:
Take one of the images you know are on the disk that don't show up in the form, convert it to JFIF and see if it will load.  If so, you have your answer.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NiceMan331Author Commented:
Great , now I have to create new topic in different area about how to convert to jfif
NiceMan331Author Commented:
yes ok slightwv
the image being loaded to the form
remaining 2 things
1- the function of file_exist not works here , it always gives false even the file exists
i want to solve issue if file not exits
2-i have only small space in the form for the image , but the images becomes not in full size , how to adjust
to display the whole image
slightwv (䄆 Netminder) Commented:
1:  Comment out the exception handler and see which exception is being generated.  Then we can go from there.

Since you are using the actual OS path, I'm guessing you have set up UTL_FILE_DIR in the init file.  Can you post the values for it?

2:  I'm not a forms person so I cannot say how to make the image display as a thumbnail.
NiceMan331Author Commented:
ok , please give me a chance till Saturday to try it
because now the office closed
NiceMan331Author Commented:
1:  Comment out the exception handler and see which exception is being generated.  Then we can go from there.

it gives this exception

Since you are using the actual OS path, I'm guessing you have set up UTL_FILE_DIR in the init file.  Can you post the values for it?
i didn't understand which value i have to post ?
slightwv (䄆 Netminder) Commented:
UTL_FILE_DIR is a spfile/fpile paramter:

If you use a path not an Oracle directory, you must had the path set in UTL_FILE_DIR.  Changing this requires bouncing the database.

Your DBA should be able to help you with this.
NiceMan331Author Commented:
ok , in here i have to close this question and open another 2 for my other 2 requirement
the file path & the image size
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.