Reported By: Robert Kaplan Reported On: 3/8/2004 For: Version 4.04 Build 1
# 1611Altering a Table and Changing an Integer Field to an AutoInc Field Does Not Modify the Last Autoinc Run the following test
1. Create a table with two integer fields (actually only one is absolutely required). First field is primary index.
2. Fill in three records with numbers 1,3 and 5 on each one of the two fields.
3. Restructure the table to make first field Autoinc.
4. Add a record
IMO, the next autoinc should be 6, however it is 0. When you try to add the second record, you get a duplicate key (1) error.
Comments and WorkaroundsThe workaround is to specifically include the desired last autoinc value when altering the table's structure in such a manner.
ResolutionFixed Problem on 3/10/2005 in version 4.05 build 1