Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating id....
Message
 
 
To
18/02/2000 13:58:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00334247
Message ID:
00334258
Views:
20
>How can I generate a id automatically for each record.

Concept is to have a table (I have named it "tables") that stores each of your table name and also the next available unique id for the table. When you need an id, find the record in "tables", lock the record, get the id, increment it, then unlock the table.

An example can be found in the Tastrade example that ships with VFP. In particular the function is newid().
Previous
Reply
Map
View

Click here to load this message in the networking platform