Table with XMLTYPE column causes: Unsupported column datatype — oracle-tech

    Forum Stats

  • 3,715,999 Users
  • 2,242,927 Discussions
  • 7,845,731 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Table with XMLTYPE column causes: Unsupported column datatype

3528087
3528087 Member Posts: 5
edited May 2018 in ODP.NET

Environment:

C# project with Visual Studio 2015

Reference to: Oracle.ManagedDataAccess 12.1.2400

Oracle.ManagedDataAccess.dll: 4.121.2.0

ORM: NHibernate 4.0.3.4000

I frequently get the following errors and I have reason to believe they all have the same root cause:

Message: Unsupported column datatype

Error Code: -1450

Source: Oracle Data Provider for .NET, Managed Driver

Message: Value cannot be null.Parameter name: value

Error code: -2146232832

Source: NHibernate

Message: could not execute query

HResult=0x80131600

NHibernate.Exceptions.GenericADOException occurred

I could not find a fix or even a workaround. Some posts seem to point to nullability of columns so I made everything nullable but that made no difference. 

Something else I found is this section in the Oracle driver readme:

Unsupported Parameter Types with OLE DB .NET Data Provider

* The Provider does not support LongVarChar, LongVarWChar, LongVarBinary, and

BSTR IN/OUT and OUT parameter types with OLE DB .NET Data Provider because

of a Microsoft's OLE DB .NET Data Provider known limitation.

Unsupported Datatypes

* The Trusted Oracle datatype MLSLABEL is not supported by the OraOLEDB driver.

* The provider does not currently support Object datatypes.

Does anybody have any idea what this might be due to?

Thank you,

Simon

Best Answer

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited April 2018 Accepted Answer

    Then it's very likely you have an earlier ODP.NET 12.1 version on your machine that was GACed. GACed assemblies override using NuGet installed assemblies.

    You can either unGAC or uninstall the earlier ODP.NET version to prevent the override from occurring. Make sure to unGAC from the correct GAC since there's one for 32-bit and one for 64-bit, as well as one for .NET 2 and one for .NET 4.

Answers

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited April 2018

    Upgrade your managed ODP.NET version. XmlType was not supported until the managed ODP.NET version that was part of ODAC 12c Release 3. At this point, you may as well upgrade to the latest ODAC 12.2 version.

  • 3528087
    3528087 Member Posts: 5
    edited April 2018

    Thank you for your response.

    But the only dependency that the C# solution uses it's whatever NuGet downloads in the packages folder, and that is: Oracle.ManagedDataAccess.12.1.2400

    Which works for everybody else on the team.

    In fact nobody has any ODP.NET installed as far as I can tell.

    What else could it be?

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,753 Employee
    edited April 2018 Accepted Answer

    Then it's very likely you have an earlier ODP.NET 12.1 version on your machine that was GACed. GACed assemblies override using NuGet installed assemblies.

    You can either unGAC or uninstall the earlier ODP.NET version to prevent the override from occurring. Make sure to unGAC from the correct GAC since there's one for 32-bit and one for 64-bit, as well as one for .NET 2 and one for .NET 4.

  • 3528087
    3528087 Member Posts: 5
    edited May 2018

    Alex,

    Sorry for not replying right away but removing the DLL from the GAC was far from straightforward as I came across a number of issues.  But long story short after doing that, the problem is indeed gone!

    It had been going on for months and I can't thank you enough for your help!

    Best,

    Simon

This discussion has been closed.