Insert or Update Cursor

Idea created by ajroman on Aug 2, 2016
    • kdunlop
    • ajroman

    ArcObjects provides us with Insert and Update cursors, both of which work just fine.  However, there isn't anything that's equivalent to an Upsert (a.k.a. Merge) statement from SQL.  For some operations (e.g. where multiple processes are inserting/updating the same table) it would be really nice to have the equivalent Upsert cursor available in ArcObjects.  We'd specify the key field (e.g. some guid field) along with the other attribution we want to update and allow the db to handle the isolation of determining whether or not our statement should be handled as an insert or an update.  This would eliminate the need for multiple levels of checking (that are error prone) and error handling that are required to emulate this functionality with the search, insert and update cursors that are available today.