Home » Developer & Programmer » Forms » Storing images into database using Oracle Forms (Oracle Forms6i)
Storing images into database using Oracle Forms [message #395258] Tue, 31 March 2009 23:18 Go to next message
Messages: 13
Registered: March 2009
Location: kolkata
Junior Member
Dear All,
i have a problem during storing images into the database using Oracle Forms6i giving error ora-6502.
My Table Structure is
Studentid varchar2(12),
StudentPhoto Blob

i want to save photo of student in any format of Image. but that is not possible through forms; only .jpg format support.
i m able to show the image on forms but not able to save image..
I use the following code if any ractifiaction please update me.

mFileName Varchar2(2000);
mPos Integer;

If :picture.SL_NO is not null Then
mFileName := GET_FILE_NAME(File_Filter=>:picture.IMAGE_TYPE||' Files (*.'||:picture.IMAGE_TYPE||')|*.'||:picture.IMAGE_TYPE||'|');
if mFileName is Null then
Msgbox1('Please select an Image File','NOTE');
Message('Please select an Image File',no_acknowledge);
mFileName :=ltrim(rtrim(mFileName));
For I in 1..Length(MFileName)
if substr(mFIleName,i,1)='\' then
mPos :=i;
End If;
End Loop;

End If;
Msgbox1('Please select Student from the list','Note');
Message('Please select Student from the list',no_acknowledge);
End If;

Re: Storing images into database using Oracle Forms [message #395577 is a reply to message #395258] Wed, 01 April 2009 22:48 Go to previous message
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please use 'code' tags around your code in future.

Your question is a common one. Please search this forum for your keywords 'GET_FILE_NAME', 'READ_IMAGE_FILE', and 'blob image'.

Previous Topic: global vs parameter
Next Topic: Convert into jarfile
Goto Forum:

Current Time: Sat Aug 19 06:16:10 CDT 2017

Total time taken to generate the page: 0.06752 seconds