Showing results for 
Search instead for 
Do you mean 

Insert Error: Can't perform the operation. GRecordset::AddNew

by Technical Evangelist on ‎04-04-2016 06:27 AM - edited on ‎04-06-2016 02:05 PM by Moderator (471 Views)


After upgrading to Oracle 12c by importing data from our 11G instance.   When we try to edit a feature class from within Geomedia, the following error occurs:


Can't perform the operation. GRecordset::AddNew


In this case, the feature class was actually a view.  GeoMedia looks at Oracle metadata when it tries to determine whether a feature class is writable and in the case of this view, it was missing an entry in Oracle's USER_SDO_GEOM_METADATA. Oracle does not require a view to have an entry here but it does require all tables to have it.   GeoMedia requires all feature classes to have an entry in USER_SDO_GEOM_METADATA regardless of whether the featue class is a view or a table.   When you export a schema and then re-import it, Oracle will populate USER_SDO_GEOM_METADATA for based the entries for any tables in the original schema but the views will be missing. 


The solution is to populate the metadata for the views via SQL, here is an example:

                 MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',- 2147483648, 2147483648, 0.00005),
                 MDSYS.SDO_DIM_ELEMENT('Y',- 2147483648, 2147483648, 0.00005),
                 MDSYS.SDO_DIM_ELEMENT('Z',- 2147483648, 2147483648, 0.00005)),NULL);

Another alternative is to use the procedures in GDOBKP to do this, GDOBKP is part of the GeoMedia Oracle Object Model (GOOM) collection of scripts and packages.