Saturday, March 5, 2011

LOAD IMAGE THROUGH FORM

Create Table as :
CREATE TABLE IMAGE
(  E_CODE     NUMBER,
  E_NAME VARCHAR2(40),
  E_PICTURE  LONG RAW)
























As above picture 
Trigger : When_button_pressed
declare
   dirname     varchar2(255);
   v_filename  varchar2(255);
begin
   tool_env.getvar('IMAGE', dirname);
   dirname := dirname || '\photo';
   v_filename := get_file_name(dirname,NULL,
   'All Files (*.*)|*.*|'               ||
   'JPEG Files (*.jpg)|*.jpg|'          ||
   'Bitmap Files (*.bmp)|*.bmp|'        ||
   'TIFF Files (*.tif)|*.tif|'          ||
   'CompuServe Files (*.gif)|*.gif|'    ||
   'PC Paintbrush Files (*.pcx)|*.pcx|' );
   if v_filename is not null then
           read_image_file(v_filename,'ANY','ABC.E_PICTURE');
   end if;
end;

No comments:

Post a Comment