Article ID: 202117 - Last Review: July 13, 2004 - Revision: 1.1 ACC2000: Jet IDENTITY Datatype Seed and Increment Reset to 1This article was previously published under Q202117 Moderate: Requires basic macro, coding, and interoperability skills.
On This PageSYMPTOMS
When you copy, export, import, or transfer tables into a new table or
database, the IDENTITY property seed and increment values are both set to the default of 1.
CAUSE
You will experience this behavior when you set the seed or increment values
of the IDENTITY property to a value other than one, and then create a new table using one of the following methods:
RESOLUTION
There is no option available in the user interface to change the seed and
increment values of an existing column. However, you can use one of two methods that use the Data Definition Language (DDL) to change the seed and increment values for a newly copied or imported table.
METHOD 1Create a new table with an IDENTITY column that has the seed and increment values that you want, other than the default value of 1. Then add the remaining fields in Design view.The following steps demonstrate how to do this:
METHOD 2Use the ALTER TABLE command to change the seed and increment values in the column that has been reset.NOTE: Before using ALTER TABLE, always make a backup copy of the table. NOTE: Make sure you are correctly setting the seed value to the next one in the sequence. Setting a seed value too high results in skipped numbering. First, in Datasheet view, sort the table in ascending order by the column with the IDENTITY property to determine the value of the last record. For instance, if your data increments by 5 and the last entry is 2005, then you should set the seed value to 2010 and the increment to 5. To run the ALTER TABLE command, follow these steps. This example changes a table to have a seed value of 10 and an increment of 4:
MORE INFORMATIONSteps to Reproduce Behavior
| Article Translations
|
Back to the top
