Home » Developer & Programmer » Reports & Discoverer » Need urgent help
Need urgent help [message #88338] Thu, 11 July 2002 03:02 Go to next message
Faisal
Messages: 16
Registered: November 2001
Junior Member
I want to extract an image from database and want to display it in the report. I am using reports 4.5 can any1 plz help me in this regard. Its urgent......
Re: Need urgent help [message #88369 is a reply to message #88338] Fri, 19 July 2002 11:02 Go to previous message
shel
Messages: 3
Registered: July 2002
Junior Member
1.Create a table to store the blobs:
create table blobs
( id varchar2(255),
blob_col blob
);

2. Create a logical directory in the database to the physical file system:

create or replace directory MY_FILES as 'c:images';

3.
Create a procedure to load the blobs from the file system using the logical
directory. The gif "aria.gif" must exist in c:images.

create or replace procedure insert_img as
f_lob bfile;
b_lob blob;
begin
insert into blobs values ( 'MyGif', empty_blob() )
return blob_col into b_lob;

f_lob := bfilename( 'MY_FILES', 'aria.gif' );
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);
commit;
end;
/
Previous Topic: nested stored procedures - Please help!
Next Topic: Re: How to put header in first page only
Goto Forum:
  


Current Time: Sat Nov 23 19:25:52 CST 2024