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

Home -> Community -> Usenet -> c.d.o.server -> How to find a blob is empty?

How to find a blob is empty?

From: Prem K Mehrotra <premmehrotra_at_hotmail.com>
Date: 9 May 2004 12:30:33 -0700
Message-ID: <43441e77.0405091130.4f846551@posting.google.com>


In my program I need to find whether a blob (blob is empty. ie.,blob locator points to empty_blob.

I wrote following code:
declare

   blob_loc blob;
   buffer raw(255) := utl_raw.cast_to_raw(

                                 'This is a new line of text4!\n\r');
begin
  blob_loc := empty_blob();
  dbms_output.put_line('Size of lob but before compression: ' ||     dbms_lob.getlength(blob_loc) || ' bytes'   );

end;

I get following error:

declare
*
ERROR at line 1:

ORA-22275: invalid LOB locator specified
ORA-06512: at "SYS.DBMS_LOB", line 535
ORA-06512: at line 8

I was expecting that length will be zero for emty_blob()but I get error
instead.Why?

I ma using Oracle9i.

Prem Received on Sun May 09 2004 - 14:30:33 CDT

Original text of this message

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