Storing images into database using Oracle Forms [message #395258] |
Tue, 31 March 2009 23:18 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
pradauman
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.
"Declare
mFileName Varchar2(2000);
mPos Integer;
Begin
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);
else
mFileName :=ltrim(rtrim(mFileName));
mPos:=Length(MFileName);
For I in 1..Length(MFileName)
Loop
if substr(mFIleName,i,1)='\' then
mPos :=i;
End If;
End Loop;
READ_IMAGE_FILE(mFileName,:picture.IMAGE_TYPE,'picture.PICS');
End If;
Else
Msgbox1('Please select Student from the list','Note');
Message('Please select Student from the list',no_acknowledge);
End If;
commit_form;
end;
"
|
|
|
|