Insert (add) fails

703
4
05-25-2011 02:56 PM
WarrenMedernach
Occasional Contributor III
Hello all,
I have some simple point data in an ArcSDE geodatabase, I have published the data to ArcGIS Server, and I'm getting my feet wet with the JavaScript API.

Using the samples provided, and substituting my FeatureServers, I can get updates and deletes to work fine, but adds (inserts) do not work.

The response to the applyEdits on an insert is:
{"addResults":[{"objectId":-1,"globalId" : null,"success":false,"error":{"code":-2147216100,"description":"Error while inserting populated row into Insert Cursor"}}],"updateResults":[],"deleteResults":[]}


Any suggestions would be greatly appreciated.

Warren M
0 Kudos
4 Replies
derekswingley1
Frequent Contributor
I think that error normally corresponds to permissions issues...which is strange since you can update and delete without issue. Can you double-check that you have full permissions granted on your feature class?
0 Kudos
WarrenMedernach
Occasional Contributor III
Hi Derek,

That's what I suspected as well, but the ArcGISSOC user has db_datareader and db_datawriter permissions and db_datawriter is supposed to have DELETE, INSERT and UPDATE permissions?

But alas, this seems to not be the case, at least as far as ArcGIS Server is concerned...  If I give the AcrGISSOC user db_owner permission, the inserts work fine.

So...  that confirms it is a permission issue, but now I need to figure out how to do this without giving db_owner permissions...

Thanks for your help.

Warren M
0 Kudos
derekswingley1
Frequent Contributor
Assigning permissions via roles might be a bit of overkill in this situation...what about assigning permissions directly on the feature class?
0 Kudos
AndyStewart1
New Contributor III
I am getting the same error but it doesn't happen every time. It also only happens when I am saving a drawn polygon and not a point or line. I can't find a consistent action that triggers it either. Could this still be a permissions thing?
0 Kudos