Problem with XMLType

I have a problem using a Table with a XMLType column.

When a query the table “select * from my_table”, get the following error:

Access violation at address 00007FFA0216C8BA in module ‘OraClient12.Dll’. Read of address 0000000000000010

I’m using

  • TOAD 12.0.0.61

  • Oracle 12.1.0.2.0 64 bits client

  • Windows 8.1 64 bits

The table is:

CREATE TABLE MY_TABLE

(

ID NUMBER,

DOCUMENTO SYS.XMLTYPE

)

Best regards,

Carlos Benitez

XMLType isn’t supported very well by the OCI when in Unicode mode (which is what Toad uses), so Toad can’t support it very well either.

When you create an XMLTYPE column like that, without specifying ‘store as binary’, or ‘store as clob’, it will default to binary. Toad can handle it in a read-only fashion as clob, but not at all as binary.

You can cast your binary XML column to clob this way:

select m.ID, m.DOCUMENTO.GetClobVal() as DOCUMENTO
from my_table m;

If you find your table in the schema browser and look at the data tab, Toad will automatically query your table like this and you should see the data in a read-only fashion. If you want to query it in the Editor, you should add GetClobVal() yourself.