Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto Increment Primary Key
Message
From
25/05/1998 11:38:11
 
 
To
24/05/1998 20:17:29
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00101564
Message ID:
00101686
Views:
77
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform