Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique key question - How do you do it?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00266795
Message ID:
00266805
Views:
18
>I'm looking for different ways people assign unique keys in multi user environments. My boss would like to use the record number, which sounds like a bad idea to me given that we would never be able to pack the table among other issues. Do we need to get more sophisticated than setting the order to the right index and doing:
>GO BOTT
>nNewID=myTable.key+1
>INSERT INTO myTable (key) VALUES(nNewID)
>
>Would it make sense to have a property hold the next value and put code in the access method to encapsulate the process? Thanks for any feedback on this basic task.
>
>Marcus.

Marcus, also check the message# 121243 where Rick Shtral posted the routine which gives you the guaranteed unique ID across the network.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform