I am using ODP.NET to get access to a geometry column in an Oracle database. My code (derived from Oracle's sample) often (but not always) crashes on the last line where the geometry column value is converted to the SdoGeometry type.
Any ideas?
OracleConnection oraConnection = new OracleConnection("User Id=scott;Password=tiger;Data Source=oracle");
oraConnection.Open();
OracleCommand oraCmd = new OracleCommand();
oraCmd.Connection = oraConnection;
oraCmd.CommandText = "select geometrie from gw_pro where pro_id=3357";
OracleDataReader oraReader = oraCmd.ExecuteReader();
oraReader.Read();
Geo.SdoGeometry geom = (Geo.SdoGeometry)oraReader.GetValue(0);