Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
-
MarkF
- Posts: 211
- Joined: Thu 02 Mar 2006 14:55
Post
by MarkF » Tue 05 Feb 2008 15:22
Hi Folks!
Does ODAC support XMLTYPE as an object attribute? For example:
Code: Select all
TYPE PATIENT AS OBJECT (
ID NUMBER(38),
LAST_NAME VARCHAR(200),
FIRST_NAME VARCHAR(200),
MEDHIST XMLTYPE
);
I get ORA-04043: object "SCOTT"."XMLTYPE" does not exist if I query a table with the above object.
Thanks for any help!
-Mark
-
Plash
- Devart Team
- Posts: 2844
- Joined: Wed 10 May 2006 07:09
Post
by Plash » Wed 06 Feb 2008 08:34
ODAC does not support objects with XMLTYPE attribute.
-
MarkF
- Posts: 211
- Joined: Thu 02 Mar 2006 14:55
Post
by MarkF » Wed 06 Feb 2008 13:28
Thanks. Is there any plan to support this? Alternately, could the xmltype attribute either be bound as a string, or could the error message be changed?
-Mark
-
Plash
- Devart Team
- Posts: 2844
- Joined: Wed 10 May 2006 07:09
Post
by Plash » Thu 07 Feb 2008 12:16
This error message is shown because OCI returns incorrect schema for XMLTYPE attribute (SCOTT instead of SYS). So ODAC cannot distinguish between user object named XMLTYPE and SYS.XMLTYPE.
A XMLTYPE attribute cannot be bound as string except the case when you cast the attribute to string in your SELECT statement.
-
MarkF
- Posts: 211
- Joined: Thu 02 Mar 2006 14:55
Post
by MarkF » Thu 07 Feb 2008 13:21
Thanks for the info. In this case, could the schema be ignored if you see a type of XMLTYPE? Is it possible to create a new type named XMLTYPE? It might be better to just work around the problem (as it seems SQLPlus does.)
Thanks,
-Mark
-
Plash
- Devart Team
- Posts: 2844
- Joined: Wed 10 May 2006 07:09
Post
by Plash » Fri 08 Feb 2008 10:06
It is possible to create a user's type named XMLTYPE. We can ignore the schema. But that is not enough because there are also the problems with reading a value from XMLTYPE attribute.
The only known way to do this is to convert the value to CLOB by executing an additional query to the database for each XMLTYPE value.
We'll consider possibility to add this functionality in one of the future ODAC versions.