Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking question
Message
De
18/06/2010 07:23:54
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Locking question
Divers
Thread ID:
01469576
Message ID:
01469576
Vues:
121
Hi,

Codemine framework takes care of file and record locking so I am dusty on the subject and need help.

A one record file holds several app variables including counters for lot number, transaction number, etc. The app normally uses table buffering across the board, including for that table. The routine that increases the counters has not been using file or record locking

You can see what this leads to. Normally there have been only one or two users updating data, but now there are several larger sites and duplicate transaction and lot numbers have appeared.

What is the best way to use locking to prevent duplicate generated numbers?

Another question in the same case. As a precaution the routine that increases the counters doublechecks that the generated number is not already present in any of the tables that store it. This raises the question of how to know the value currently in the drive when a table is buffered. One way is using SQL SELECT without BUFFERING = .T. Is there another way?

Thank you very much,

Alex
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform