I have a project where I have about 80 tables. They all have the field Numero as Integer. This field serves for the primary key. I have a Table.dbf which contains all the names of those 80 tables as well as a field Table.LastID which holds the current last primary key of each of those tables. I need to scan Table.dbf and apply the following process for each of those 80 tables:
1. Open the table in exclusive use
2. Alter the structure of Numero field to be Auto Increment
3. Adjust the table auto increment functionality so it would start from the value of Table.LastID
It is basically point 3 which causes me a problem. By default, changing the structure to Auto Increment makes the current primary key to be 0. I need it to be set to Table.LastID.