Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto Increment Primary Key
Message
De
25/05/1998 11:38:11
 
 
À
24/05/1998 20:17:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00101564
Message ID:
00101686
Vues:
76
>Since VFP doesn't have an auto-increment field,
>how have others done their increment for web
>applications?
>
>I am using VFP tables and "ADO", we can't use any
>locking schemes.
>
>I don't want to use Access (too corruptable) or
>SQL Server (extra cost by my web hosting service).
>But those two databases do offer auto-increment.
>
>I was thinking of using Application variables
>but since every table has a primiary key,
>there would be too many Application variables.
>
>So once again ... how are you incrementing
>your primary keys from VB Script to VFP tables?

If table are in DBC, you can do it like everybody else does, with a function in the default value of the PK that gets an autoincrementing number from another table that stores all table's Pks. If the table is free, you can still use the same concept, you just have to handle it manually in code from everywhere that records get added to the table, and you can't use a dbc's stores procedure.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform