Re: set BFILE column to NULL with OCILobFileSetName( )

From: waynewinchjr <member_at_dbforums.com>
Date: Thu, 05 Dec 2002 18:57:56 +0000
Message-ID: <2129589.1039114676_at_dbforums.com>


Kevin,

I, too, have experienced the problem you describe. Operationally, I believe things are working fine, albeit a little unconventionally.

Basically, the BFILE you inserted as NULL results in the creation of an invalid LOB locator (or simply, NULL, which is an invalid LOB locator as far as Oracle is concerned) for that BFILE in that row. If you are using the Oracle DBMS_LOB package or OCI to read the contents of BFILEs, use a clause in the SELECT statement that prevents fetching of NULL BFILEs (since you cannot do anything with them anyway), e.g.,

SELECT bf FROM bfile_tab WHERE bf IS NOT NULL;

To insert a NULL BFILE from OCI in the example you describe, simply set the associated indicator to -1 as you indicated you had done. Use the SELECT statement above to constrain the result set to only valid BFILEs.

--
Posted via http://dbforums.com
Received on Thu Dec 05 2002 - 19:57:56 CET

Original text of this message