Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default unique ID values for a field in a remote table ?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00103696
Message ID:
00109942
Views:
36
>>If you are concerned about making the ID numbers tight with no gaps, then
>>structure your new Id table like this:
>>
>>TYPE NUMBER
>>
>>NEW 000564
>>SALVAGE 000563
>>
>>When you go to add a new ID, FIRST search for a SALVAGE type...If found() Lock
>>it, use it, deleted it. If its NOT found(), search for a NEW type...lock it,
>>increment it, unlock it.
>>
>>And no matter what...If the save falls through, Insert the unused ID number
>>into the table as a SALVAGE type.
>>
>>In otherwards...The salvage type will always hold FAILED ID numbers...and you
>>will always use them first.
>
>Mike,
>
>What would happen if you have say three users all start adding a new record and
>all three end up cancelling the adds? I don't see how your structure would
>support multiple IDs to salvage. Am I missing something?

then all three would enter a salvaged record in the newIDs table.

And the type NEW idnumber would not get used again until all the salvaged numbers had once again been successfully removed.

Sorry for the delay...real busy

Mike
That would be me!
Previous
Reply
Map
View

Click here to load this message in the networking platform