OCI_ERROR ORA-22060 argument  is an invalid or uninitialized number Inserting SDO_GEOMETRY
(Doc ID 1527535.1)
Last updated on APRIL 04, 2019
Applies to:Oracle Spatial - Version 184.108.40.206 and later
Information in this document applies to any platform.
An application in C under Linux RedHat 5 using OCI and we are adding geometry in some tables of the database.
For the test we create the following table:
CREATE TABLE TEST_GEO
For the insertion of the geometry in database we create a SDO object with the OCI functions (OCIObjectNew, OCIObjectSetAttr).
Ths insertion of the object in the database works fine with the follwoing SQL request (where :3 is the SDO object):
INSERT INTO TEST_GEO VALUES(:1, :2, SYSDATE, :3)
And we obtain the following record in the table:
ID => 0
STATUS => C
DOM => 03-SEP-12
GEO => SDO_GEOMETRY(2003, 8307, SDO_POINT_TYPE(NULL, NULL, NULL), SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(1, 1, 2, 1, 2, 2, 1, 2, 1, 1))
But if we create the same SDO object with the OCI functions to check the geometry with the following request (where :1 is the SDO object):
SELECT SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(:1, 0.3 ) FROM DUAL
We get the following error:
Error - OCI_ERROR: ORA-22060: argument  is an invalid or uninitialized number
ORA-06512: at "MDSYS.SDO_3GL", line 1440
ORA-06512: at "MDSYS.SDO_GEOM", line 523
ORA-06512: at line 1
Why we get this error ? and what should be changed ?
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document