我正在尝试从oracle表中填充数据集。我收到以下错误:
未指定SDO_GEOMETRY或无效
当我尝试从包含几何列的表中填充数据集时:
da.Fill(ds, "Default");
我添加了对NetSdoGeometry
的引用还包括它:
using NetSdoGeometry;
但我仍然收到同样的错误。
我也尝试将类型添加到配置中,如下所示:
<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>
但这没有帮助。我错过了什么?
答案 0 :(得分:0)
有类似的问题。 我们使用了NetTopGeomtry的NetTopologySuit,包括:
<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>
(这取自NullReferenceException in Oracle.DataAccess for empty SDO_GEOMETRY虽然这是另一个问题,但udtMapping是正确的,对我们有用。)