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

Home -> Community -> Usenet -> c.d.o.misc -> Re: LOB Support with Object Types?

Re: LOB Support with Object Types?

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 17 Jan 2005 21:09:23 -0800
Message-ID: <41ec99f7$1_1@127.0.0.1>


Michael Schaefers wrote:

> I have problems accessing a BLOB within an object type (Oracle 10g on a
> Linux machine).
>
> Consider a simple type
>
> CREATE TYPE foo AS OBJECT (
> x int,
> b BLOB,
> ) NOT FINAL INSTANTIABLE;
>
> The BLOB has to be accessed within an external C routine. To achieve
> this, I pass a foo object to a procedure similar to this:
>
> PROCEDURE bar (f OUT foo) IS EXTERNAL
> LANGUAGE C [...]
>
> When I try to execute the following SQL-Statement I get an error when
> opening the BLOB with OCILobOpen():
>
> DECALRE
> f foo;
> BEGIN
> <packagename>.bar(f); *** C-Error is risen here
> [...]
> END;
>
> The error message says "ORA-22275: invalid LOB locator specified"
>
> One reason might be that, since my object f does not yet exist in any
> table, the BLOB can not be accessed.
>
> Does anybody have a clue?
> Regards,
> Michael Schaefers

Go to http://www.psoug.org
click on Morgan's Library
click on DBMS_LOB package
look at the code examples: The page is not completed yet but hopefully what is there will be somewhat helpful. Also look at http://asktom.oracle.com as Tom's examples will be complete.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Jan 17 2005 - 23:09:23 CST

Original text of this message

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