Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Primary keys
Message
From
08/08/1996 13:16:20
 
 
To
08/08/1996 12:53:12
Paul Baker
Pacific Environmental Services, Inc.
Rtp, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00005298
Message ID:
00005302
Views:
25
>Can someone give me advice on the best way to assign primary key field values to individual records in a table. I have tables where the only unique value field is a description field. I don't want to use a 50 character description field as the primary key. I have routines to generate a key based on a counter. Is this the best way to assign values?

I use my admin table.dbf for that purpose. It keeps a bunch of information of each of my tables and one of those field is the current id. My BaseForm::AddNew() routine will increment this id for each new records. The id field is an integer.

Some people in FoxPro Windows 2.6 we using the binary key for their unique id to save some space. In Visual FoxPro with the integer field, most of the people are now using the integer field.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform