Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary keys and candidate keys
Message
From
07/09/2000 09:32:52
 
 
To
07/09/2000 00:04:25
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00413219
Message ID:
00413429
Views:
17
>Make it a candidate key and do some error trapping because you WILL get an error if you try to update a duplicate value, or trap it logically using a SEEK to look for the value before updating the table and make it any type of key you want.

Just to be clear: You may have to re-open the table with another alias and do the seek() on that. If you've got row bufferning, doing a seek will move the record pointer, try and update the table and if it is a duplicate key you'll get the error message anyways.

Or you can use IndexSeek(), I believe. In either case, if they Return True, you have to check the primary key or record number to make sure the key you found isn't the one you're trying to save.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform