AnsweredAssumed Answered

How to get database constraint violation error using EditOperation

Question asked by schneider.barbara@gmx.ch on Mar 13, 2020
Latest reply on Mar 13, 2020 by sean_jones-esristaff

I am writing a feature to an Oracle Enterprise Geodatabase using an edit operation:

var editOperation = new EditOperation();

// Assign shape and attributes
var attributes = new Dictionary<string, object>();
attributes.Add(shapeFieldName, shape);
attributes.Add("myField", row["myField"]);

// Create new feature               
editOperation.Create(featClass, attributes);
bool succeeded = editOperation.Execute();

When executing the editOperation fails, I have no information what went wrong, i.e. if I violated a unique key constraint. Is there a possibilty to get the error? Or is there a better way to write features to an Enterprise Geodatabase?

Thanks, Barbara

Outcomes