Home » Developer & Programmer » Forms » inserting image problem (forms 6i and oracle 8.0.6.0.0)
inserting image problem [message #525470] Mon, 03 October 2011 07:16 Go to next message
shashank_kurasrediffmail
Messages: 63
Registered: July 2011
Location: hyderabad
Member

hi all
I am getting error at compilation time.
I want to insert images into table
the code is
declare
f_lob bfile;
b_lob blob;
begin
INSERT INTO imag  VALUES(empty_blob())
return img INTO b_lob;
f_lob := bfilename( 'PIC', 'DESERT.JPG' );
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
end; 


errors are
[code]




Thanks for all in advance
  • Attachment: Capture.PNG
    (Size: 5.90KB, Downloaded 623 times)
Re: inserting image problem [message #525477 is a reply to message #525470] Mon, 03 October 2011 07:28 Go to previous message
shashank_kurasrediffmail
Messages: 63
Registered: July 2011
Location: hyderabad
Member

hi all,
am able to read the image (in forms) into an image object.
and is there a way to insert the image into database by using the image object .


for ex:
with the help of below code
begin
read_image_file('C:\Users\shashank.kura.VISAKA\Desktop\img\DESERT.JPG','ANY','BLOCK3.IMAGE6');
end;


am able to read image into an image object .

Am trying to insert image into database as below
in when button pressed trigger
insert into imag values('block3.image6');
block3--block name
image6--image object name


but am getting error as wrong expression.



thanks for all in advance.

[Updated on: Mon, 03 October 2011 22:47]

Report message to a moderator

Previous Topic: how to filter data by list item
Next Topic: Problem when running form after moving to another instance
Goto Forum:
  


Current Time: Sat Sep 07 13:05:45 CDT 2024