Hi,
I am inserting pictures into table
when execute the procedure it says successfully procedure completed
but i am unable to see pictures in table as +ve number in respective column.
could any one tell me where i am going wrong here
please........
create or replace procedure insert_image
(p_catalogn number,p_photo varchar2)
as
f_photo bfile;
b_photo blob;
begin
update sh_photo set picture=empty_blob()
where catalogn=p_catalogn
return picture into b_photo;
f_photo := bfilename('photos',p_photo);
dbms_lob.fileopen(f_photo,dbms_lob.file_readonly);
dbms_lob.loadfromfile(b_photo,f_photo,dbms_lob.get length(f_photo));
dbms_lob.fileclose(f_photo);
commit;
exception
when others then
dbms_output.put_line('**** error ***** check your procedure');
end;
*************************************
execute insert_image(1,'Animallandscape.jpeg');
begin
insert_image(1,'Animallandscape.jpeg');
end;
PL/SQL procedure successfully completed
*************************************
select catalogn,dbms_lob.getlength(picture) as photo_size from sh_photo;
so in photo_size showing all zeros instead +Ve number as picture inserted into.
please tell me where i am doing mistake....