Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro Multi-User : Primary key allocation - HELP!!
Message
De
30/09/2000 15:04:21
 
 
À
30/09/2000 10:43:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00422640
Message ID:
00423144
Vues:
23
Hiya Craig,

Many thanks for the reply. I take note about 2 users appending records at the same time. I didnt consider that possibility, although that isnt causing my problem of duplicate keys since the record already exists.

Using FLOCK seems an excellent idea and I will implement this in my stored procedures, but i'm still not sure why the original function failed and gave duplicate keys which is a little worrying.

I consider 2 scenarios a possibility:

1) When i UNLOCK the record it performs an implicit FLUSH, but i am wondering if its possible that another user creeps in and updates the record, hence giving a duplicate key, in between the implicit UNLOCK/FLUSH. I would assume though that flushing occurs before the unlocking. Anyway I will perform an explicit FLUSH before unlocking to remove this possibility.

2) RLOCK is failing in some way and returning .T. when not actually having gained a record lock. In this case the possibility of duplicate keys arise. Hence i will start using FLOCK. Have you any ideas if RLOCK is known to fail in this way under any conditions?

Again thanks for your reply Craig, I'm hoping it will resolve my problems.


Paul.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform