Wednesday, August 6, 2014

How to Read Image File at Oracle Forms 10g ?

I heard and answered lot's of question. How i read image file from file system to Database in oracle forms 10g ?
Here is the solution.
First of all you have to configure webutil correctly. You need to configure formsweb.cfg, webutil.cfg
Attach the webutil.pll library at your forms. Make object group and subclass of webutil.pll
Now add a puss button to your form and write the following code at When-Button-Pressed trigger
--------------------------------------------
declare
 vfilename varchar2(300);
begin
 vfilename := client_get_file_name(file_filter => 'jpg(*.jpg,*.gif)|*.*');
 if vfilename is not null then
 client_image.read_image_file(vfilename,substr( vfilename,instr( vfilename, -1)),'COMPANY_INFO_MST.CIM_LOGO');
 client_image.write_image_file(vfilename,'','COMPANY_INFO_MST.CIM_LOGO'); 
 end if;
 
end;
-----------------------------------
set the following property of the image item.
image format: TIFF
sizing style: Adjust

0 comments:

Post a Comment