I have an SDE C API application that is at least 10 years old. It has been through three major Oracle upgrades and the same number of SDE upgrades. It has worked fine until last month when an Oracle security patch was installed on the Oracle 11g databases. Now I am getting a FK constaint violation between the business table and the associated F table. If the constraint is disabled everything works fine. I had the DBA switch the layer from normal_io to load_only_io and back to force a rebuild of the indices. After that it worked until he noticed the contsrint was disabled and then enabled it in Oracle. Now it doesn't work again.
Below is the code snippet.
int update_shape_column(SE_STREAM * update_stream,
SHORT num_cols,
CHAR ** update_attrs,
SE_SHAPE * shape,
char * update_where_clause)
{
LONG rc = SE_SUCCESS;
SHORT shape_indicator;
shape_indicator = SE_IS_NOT_NULL_VALUE;
rc = SE_stream_update_table(*update_stream, "CATMAN.DATA_SET_TYPE_COVERAGE",
num_cols, (const CHAR **) update_attrs, update_where_clause);
if (rc != SE_SUCCESS)
{
process_error(NULL, *update_stream, rc, "SE_stream_update_table");
return rc;
}
rc = SE_stream_bind_input_column(*update_stream, 1, *shape, &shape_indicator);
if (rc != SE_SUCCESS)
{
process_error(NULL, *update_stream, rc, "SE_stream_bind_input_column");
return rc;
}
shape_indicator = SE_IS_NOT_NULL_VALUE;
/* Execute the query */
rc = SE_stream_execute(*update_stream);
if (rc != SE_SUCCESS)
{
process_error(NULL, *update_stream, rc, "SE_stream_execute");
return rc;
}
/* Reset the update stream */
rc = SE_stream_close(*update_stream, TRUE);
return rc;
}