Showing results for 
Search instead for 
Do you mean 

How are autonumber fields defined in SQL Server?

by Anonymous on ‎02-12-2016 01:46 PM - edited on ‎04-06-2016 12:46 PM by Moderator (981 Views)


How are autonumber fields defined in SQL Server and how does GeoMedia's metadata table (ie, GFIELDMAPPING) register such autonumber fields?


SQL Server has an auto increment type that is similar to Access's autonumber and Oracle sequences.

1) Open SQL Server Enterprise Manager. 
2) Display the table in Design Table. 
3) Select the Column you want to assign as AUTONUMBER and change the 
   following column properties: 
      Identity = Yes
      Identity Seed = 1
      Identity Increment = 1
4) Exit and save the table changes. 

This sets it up for SQL Server but you still need to let GeoMedia know that the AUTONUMBER (AUTOINCREMENT) is available. For this you need Database Utilities:

  • Open Database Utilities and connect to your SQL Server database.
  • If metadata already exists for the table in question, you will need to Delete any existing metadata for that table.
  • Create the metadata for the table by assigning the datatype for the auto increment column to autonumber.
  • Don't forget to set your geometry type and coordinate system.

Now GeoMedia will recognize the column as autonumber.