Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adapting ID.dbf
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00235467
Message ID:
00235503
Views:
16
>We happen to have an unusual situation with a table that will have two unique keys on a record. Looking at the native functionality of the framework for generating a unique id with the ID table and NewID(), I wasn't sure if multiple keys in one table could be done easily. Anybody have any suggestions?

You can do this pretty easily:

1. Add an entry for each unique ID field into ID.dbf giving each a unique "KeyName" value. For example: TableID1, TableID2

2. When you call the NewID() function for each field, pass the corresponding KeyName value for each as a parameter. For example: NewID("TableID1") or NewID("TableID2").

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform