OCI_ERROR ORA-22060 argument  is an invalid or uninitialized number Inserting SDO_GEOMETRY
Last updated on FEBRUARY 08, 2017
Applies to:Oracle Spatial - Version 18.104.22.168 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 ?
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms