Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key generation via ODBC
Message
 
À
05/05/1999 06:59:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00210160
Message ID:
00221804
Vues:
17
Gene;

<< Use a Application level variable as your incremental value.
(Select MAX(increment) FROM yourtable at application startup.)

Then when you need to increment the primary key,
APPLICATION.LOCK
increment=increment+1
retrn_increment=increment
APPLICATION.UNLOCK >>

This is an interesting approach I think it should work for a web only application. I guess I would need one application variable for each table I want to generate primary keys for. It would fall down though of other applications access the same data (i.e. a FoxPro front end). Not an issue for one situation I am looking into, but a problem in another.

Thanks;

Jim Munn
Visual Data Solutions
Jim Munn, MCSD
Visual Data Solutions
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform