Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.oracle -> Oracle 9i cannot display bfile image properly

Oracle 9i cannot display bfile image properly

From: Jack <liujacky_at_yahoo.com>
Date: 25 Feb 2004 10:31:51 -0800
Message-ID: <7cf4b8f5.0402251031.17d247f0@posting.google.com>

Hi,
We just upgrade from Oracle 8.1.7.4 to 9.2.0.4 in Solaris system. We found all images display with Bfile do not work in Oracle 9i but they work well in 8.1.7.4, no code change. could you please help us? Here is the source code:

 PROCEDURE bfileshow (bfilein bfile)
  IS

	mybfile bfile:=bfilein;
	--l_amt number default 30;
	l_amt BINARY_INTEGER := 1024; 
	l_off INTEGER := 1; 
	l_raw RAW(1024); 

  BEGIN
   owa_util.mime_header('image/gif');
   DBMS_LOB.OPEN (mybfile, DBMS_LOB.LOB_READONLY);    LOOP
	DBMS_LOB.READ (mybfile, l_amt, l_off,l_raw);
	htp.prn(utl_raw.cast_to_varchar2(l_raw));
	l_off:=l_off+l_amt;

   END LOOP;
   DBMS_LOB.CLOSE (mybfile);
   EXCEPTION
          WHEN NO_DATA_FOUND THEN
	htp.p(sqlerrm);
	dbms_lob.close (mybfile);

  END bfileshow;

Thanks,

Jack Received on Wed Feb 25 2004 - 12:31:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US