Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating primary key from imported data
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00066546
Message ID:
00066611
Views:
41
>The basic 'New ID' procedure for any VFP app assumes following:
>1. You have 'setup' table with two fields: tablename C, counter I.
>2. Any time you want to create new unique ID, you go to the table, search for appropriate 'tablename', lock the record, return 'counter' value, increment counter (to prepare for next ID) and unlock the record.
>This is robust way, but if you have simpler (exclusive usage) situation you could use something simpler, e.g. even use RECNO() to fill primarykey field.

I am looking for a simpler, exclusive usage answer. How would I use RECNO(). That's the first thing I tried. I created a new numeric field in my temporary import table and in the Default Value it put RECNO(). It didn't work though...when I imported the data this field remained empty.

Jeff
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform