Setting the field OBJECTID as an identity for autoincrement

9509
17
10-28-2011 07:32 AM
AlaeddineSaadaoui
Occasional Contributor
I am using SQlServer database with ARCSDE 10 and I am wondering if I could set the OBJECTID field of my tables as an identity to be able to auto increment it when inserting data by using SQL queries.
Thank you in advance.
Alaeddine Saadaoui.
saadaoui@marshall.edu
17 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Alaeddine,

Currently, ArcSDE doesn't support columns with identity property set to True. Tables/Feature classes with this property cannot be edited in ArcMap or registered as versioned. 

When attempting to create non-versioned edits in ArcMap you will receive an error similar to:

"Database Row Change: An unexpected failure occured.
Underlying DBMS error[Microsoft sql server Native Client 10.0: Cannot insert explicit value for identity column in table 'tableName' when IDENTITY_INSERT is set to OFF.][..tableName]."
0 Kudos
NataliyaLys
Occasional Contributor II

Jake,

Do you know if the most recent version of ArcSDE supports column with IDENTIFY properties? I was just trying to set it up, and when I tried to edit my data in ArcMap I got the same error that you were talking about four years ago .

Thank you,

Nataliya

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Hi Nataliya,

Unfortunately, this is still not supported.

0 Kudos
NataliyaLys
Occasional Contributor II

Thank you Jake. Is there any other way to auto-generate sequential number in a feature class, without setting "IDENTIFY" property on the column through SQL?

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Take a look at the Water Utility Network Editing solution.  Included with this is the attribute assistant add-in.  Below is a good help link that walks you through the different methods the add-in provides:

Overview - Attribute Assistant | ArcGIS Solutions

For example, take a look at the autonumber method:

Attribute Assistant methods - Attribute Assistant | ArcGIS Solutions

0 Kudos
NataliyaLys
Occasional Contributor II

That will only work for the ArcGIS Desktop? Correct? I am trying to get it to work for a feature service that is edited through the Collector app. Thanks, again.

RebeccaStrauch__GISP
MVP Esteemed Contributor

Nataliya, you may want to branch or create a new question in Collector for ArcGIS  That will help to get it to people that know Collector more, (Which still might be Jake)

0 Kudos
VenusScott
Occasional Contributor III

I'm needing it in Web AppBuilder editing!

Web AppBuilder for ArcGIS

ColeAndrews
Occasional Contributor III

Ditto Venus Scott​, we need as well