>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.