Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Grafix?
Here is some PL/SQL code that I have yet to get working.... Quick answer... use the DBMS_LOB package....
DECLARE
filevar BFILE;
blobvar BLOB;
result INTEGER;
amount INTEGER;
filename CHAR(20);
dir_alias CHAR(100);
BEGIN
--first create a Oracle directory
--using create directory FILEDIRGEOGA as '/oracle/oracle8owner/data';
filevar := BFILENAME('FILEDIRGEO','logo2.gif');
COMMIT;
END;
/
You can use forms too. Create an image_item and call.
read_image_item('path to the bmp file','BMP','block_name.image_item_name');
Make sure the block is set up to query a base_table you want to store your
image in.
Then hit F10 to commit it to a blob or long raw column. Note: The valid image
file types are: BMP, CALS, GIF, JFIF, PICT, CALS, RAS, TIFF, or TPIC. (Note:
File type is optional, as Forms 5 will attempt to deduce it from the source
image file. To optimize performance, however, you should specify the file
type.)
ecatz wrote:
> Hi!
>
> Can anyone tell me how I can read a bmp file from the local drive and store
> it in an Oracle table in PL/SQL?
>
> Thanks
>
> ECatz
-- Tim McConechy Database Administrator/Programmer Analyst WestCoast Interchange Enterprises Phone:(250) 472-4331 Fax:(250) 721-6497 Email: tmcconec_at_wie.com http://www.wie.comReceived on Mon Mar 16 1998 - 00:00:00 CST
![]() |
![]() |