We're writing an app that will programmatically update an SDE feature class using the C API. The SDE logic is a command-line C program, which accepts the usual SDE service flags: -s server, -i instance, -d db, -u user, -p password. The program reads from a DB table from which it will determine lat, long, attribute data, etc. and create a feature to insert into a feature class. This feature class will, in turn, be referenced in a MXD that is used for an AGS MapServer service.
I've only ever seen that to modify a feature class (usually when using AGS toolbox tools and/or python scripts against it) there are locks that require that the AGS service be shut down, otherwise an error is thrown. And even when shutting down the service, it seems that there are frequently persistent locks that need to be forcefully killed w/ sdemon.
We're actually re-writing an existing app that runs the update process in a nightly batch program, but users want to see the feature changes in "real time" (the C API is invoked by a .NET app which has an embedded map viewer), so we have to be able to update w/o shutting down the AGS service.
For additional background, the feature class is a simple feature class that is not versioned and does not participate in a topology or network or anything else. ArcSDE version is 9.2 for Oracle and AGS version is 9.3.1.
My question is: Has anyone had similar issues with updating a feature class used by an AGS service (or otherwise have locks against it) and been able to work around them? If so, how?