简体   繁体   中英

SDO_GEOMETRY is not specified or is invalid

I am attempting to fill a dataset from an oracle table. I am getting the following error:

SDO_GEOMETRY is not specified or is invalid

When I attempt to fill a dataset from a table which contains a geometry column:

da.Fill(ds, "Default");

I have added a reference to NetSdoGeometry

And also included it:

using NetSdoGeometry; 

But I still receive the same error.

I also tried adding the type to the config as follows:

<oracle.dataaccess.client>
    <settings>
      <add name="sdogeometry" value="udtMapping factoryName='NetSdoGeometry.sdogeometry, NetSdoGeometry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' typeName='SDO_GEOMETRY' schemaName='MDSYS'"/>
    </settings>
  </oracle.dataaccess.client>

But that did not help. What am I missing?

had similar problem. We used NetTopologySuit insted of NetSdoGeomtry and included:

<oracle.dataaccess.client>
  <settings>
    <add name="SdoGeometry" value="udtMapping factoryName='NetTopologySuite.IO.Sdo.SdoGeometry, NetTopologySuite.IO.Oracle' typeName='SDO_GEOMETRY' schemaName='MDSYS'" />
    <add name="SdoElemInfoArray" value="udtMapping factoryName='NetTopologySuite.IO.Sdo.SdoGeometry+ElemArrayFactory, NetTopologySuite.IO.Oracle' typeName='SDO_ELEM_INFO_ARRAY' schemaName='MDSYS'" />
    <add name="SdoOrdinateArray" value="udtMapping factoryName='NetTopologySuite.IO.Sdo.SdoGeometry+OrdinatesArrayFactory, NetTopologySuite.IO.Oracle' typeName='SDO_ORDINATE_ARRAY' schemaName='MDSYS'" />
    <add name="SdoPoint" value="udtMapping factoryName='NetTopologySuite.IO.Sdo.SdoPoint, NetTopologySuite.IO.Oracle' typeName='SDO_POINT_TYPE' schemaName='MDSYS'" />
  </setting>
</oracle.dataaccess.client>

(this is taken from NullReferenceException in Oracle.DataAccess for empty SDO_GEOMETRY Although this is about another problem, udtMapping is correct and worked for us.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM