Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Read Blob image in Java Bean in Forms11g

wael amarApr 28 2016 — edited Apr 29 2016

Hello,

I have a problem. I have loaded an image to database, but i can't display it in JavaBean in Forms

I used Code mentioned in forms.pjc.bean Project

-- load an image from the database --

declare

PC$WhereClause Varchar2(300) := 'select PHOTO from PHOTOS where  IDENTIFIANT=2' ;

PC$Command Varchar2(300);

PC$Tooltip Varchar2(300);

LB$Ok boolean ;

LC$Image Varchar2(32767) ;

LC$Clause Varchar2(4000) ;

BEGIN

--

-- Read a BLOB content from the database

--

-- Select the Blob column --

If PKG_LAF.Select_Blob(PC$WhereClause) Then

Loop

-- Get the image chunks from the database --

LC$Image := PKG_LAF.Get_B64_Chunk ;

If LC$Image Is Not Null Then

-- Send the chunks to the Java Bean --

message('read_file_lob_fun'||LC$Image);message('read_file_lob_fun'||LC$Image);

Set_Custom_Property( 'CNTRL.BEAN', 1, 'READ_IMAGE_BASE', LC$Image ) ;

Else

  -- End the sending process --

  LC$Image := '[END_IMAGE]' ;

  If PC$Command is not null then

       LC$Image := LC$Image || '|' || PC$Command ;

  End if ;

  If PC$Tooltip is not null then

       LC$Image := LC$Image || '|' || PC$Tooltip ;

  End if ;

       Set_Custom_Property( 'CNTRL.BEAN', 1, 'READ_IMAGE_BASE', LC$Image );

  Exit ;

  End if ;

End loop ;

End if ;

END;

any help please......................???

This post has been answered by François Degrelle on Apr 29 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2016
Added on Apr 28 2016
12 comments
2,194 views