Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Turning tables to have auto increment
Message
De
03/03/2006 15:25:15
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Turning tables to have auto increment
Divers
Thread ID:
01101377
Message ID:
01101377
Vues:
57
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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform