This content has been marked as final. Show 4 replies
Have you tried to use SDO_LRS.CONVERT_TO_LRS_GEOM fist?
An exception is raised if geom_segment has an invalid geometry type or dimensionality, or if the location is out of range.
Have you checked your shape? Can you show your geometry here?
Hmm, I tried using SDO_LRS.CONVERT_TO_LRS_GEOM(shape) instead of shape, and I got an InvalidOperationException:
schemaName='MDSYS' typeName='SDO_GEOMETRY' is not specified or is invalid.
I also tried to check the shape using: select shape from test_schema.test_table where route='ABC'
But that gave me the same error. Is there a different way to check the shape?
I'm using C# with ODP.NET.
Here is the current version of the code that is failing:
var param = new OracleParameter("geom", OracleDbType.Object);
param.UdtTypeName = "MDSYS.SDO_GEOMETRY";
param.Direction = ParameterDirection.Input;
OracleCommand oCmd = new OracleCommand();
oCmd.Connection = this.oConn;
oCmd.CommandText = queryStr;
oCmd.CommandType = CommandType.Text;
OracleDataAdapter da = new OracleDataAdapter(oCmd);
DataTable dt = new DataTable();
The exception is generated by the da.Fill(dt) line.