Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiuser table update
Message
 
À
30/01/2001 11:08:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00470091
Message ID:
00470324
Vues:
22
Hi Grigore

I use a lookup table that hold the id's and lock that record while I get the needed value.

A good example how this might be done you can find at Craig Berntson's site

http://64.252.14.73/Articles/kb006.htm

He shows it for surrogate integer keys, what in general always worked fine for me, but the idea can be varied of course.

HTH
Markus


>Hello, All!
>
>Please, I have a problem which is drive me crazy today: how can I assure an unique id number for multiuser table buffering updates? To be more explicit:
>
>I want the users to be able to extract next id from table (this is an easy thing to do) then to append records in a local view from that table (this is also easy to do), then to update the base table, using TABLEUPDATE. Now follows the hard part: when they click on the 'Update' button, the application should extract the next id, then the records from local view are renumbered and updated. But:
>
>Is there a small window of time (between the finding the next id and the update) in wich another user can do the update. And locally the records are numbered with id's already existent in the base table! (inserted by the other user). I know that the time is about miliseconds, but if there are many users, is possible the records from different computers to be numbered with the same numbers. This is no theorethical disscusion. This has happend to me, yesterday. The result - database inconsistencies.
>
>I wonder, is there a way to eliminate this problem? (I'm not considering table locking. I expect something else).
>
>Many thanks.
>
>Grigore Dolghin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform