マルチポリゴンを定義する文字列(GeoObj.ToString)があります: MULTIPOLYGON (((1 1 0, 1 10 0, 10 10 0, 10 1 0, 1 1 0), (2 2 0, 2 4 0, 4 4 0) 、4 2 0、2 2 0)、(5 5 0、5 9 0、9 9 0、9 5 0、5 5 0))、((11 11 0、11 20 0、20 20 0、20 11 0) 、11 11 0)、(12 12 0、12 14 0、14 14 0、14 12 0、12 12 0)、(15 15 0、15 19 0、19 19 0、19 15 0、15 15 0)) )
ID (varchar2(38)) と Geometry フィールド (SDO_GEOMETRY) を持つ TEST_POLYGON という名前のテーブル。
今、私はこの方法でマルチポリゴンを挿入しようとしています:
Dim oda = New OracleDataAdapter()
Dim insertStatement = "INSERT INTO TEST_POLYGON (ID, GEOMETRY) "
insertStatement = insertStatement & " VALUES (:id, sdo_geometry(:geometry)) "
oda.InsertCommand = New OracleCommand(insertStatement, dbConn)
oda.InsertCommand.Parameters.Add(":id", Guid.NewGuid.ToString)
oda.InsertCommand.Parameters.Add(":geometry", GeoObj.ToString)
oda.InsertCommand.ExecuteNonQuery()
Guid.NewGuid.ToString はランダムな uuid です。しかし、今では次のエラーが発生します:
A first chance exception of type 'Oracle.DataAccess.Client.OracleException' occurred in Oracle.DataAccess.dll
ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: -2
ORA-06512: at "MDSYS.SDO_UTIL", line 187
ORA-06512: at "MDSYS.SDO_GEOMETRY", line 76
ORA-06512: at line 1
何が間違っている可能性がありますか?