Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

After making a check in from an arcpad AXF file, i remark that there's duplicate object ID records , this Arcsde pgsql table is versioned and edited by Axf checkins and a .net engine application. the weird behaviour is that the objectid's from checkin start from the last objectID checked in from AXF in the last time, but between these times i added several records using the .net app so the objectids produced here are duplicated by the last check in, the .net app adds record directly through pgsql, so i set the objectID to (Max(ObjectID) + 1).

i'm using ArcSDE 10.1 and PGsql 9.0.8.

i'm not sure but i suppose that the problem come from generating ObjectID in .net app level, How i could generate ObjectID and inform Arcsde that this OID it has been used ?

share|improve this question
    
Would it be helpful to add a Global Unique Identifier (GUID)? –  Roy Aug 14 '12 at 19:42
    
i avoided GUID because it's much harder to generate GUID to insert row from .net app, using pgsql query. –  geogeek Aug 14 '12 at 19:57

1 Answer 1

up vote 2 down vote accepted

Here are two possible solutions for your problem:

1) Modify the ArcSDE System tables from your .NET application. The SDE_LAYERS and SDE_TABLE_REGISTRY tables contain rows that represent your table. The row for your table has a MINIMUM_ID field value, which is what the geodatabase will use when it inserts new rows.

I don't recommend making changes to the ArcSDE tables, as they are used by the geodatabase. It is risky.

2) Alter your table's registration with the sdetable command so that the geodatabase does not assign IDs automatically. This is the -C USER option. Then, create a sequence in your database that assigns unique integer IDs to new rows.

I prefer this method as it ensure that a single entity (the database) is now responsible for assigning IDs, and both ArcSDE and your code will need to worry about it.

share|improve this answer
    
i'm a newbie in Arcsde, i tried the commands, but it seems that i'm missing something, it seems i don't have a service, how to make it ? C:\Users\hp>sdeservice -o list SDE service Information ------------------------------------------------------------------ Sde service doesn't exist or is not registered properly. –  geogeek Aug 15 '12 at 0:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.