Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record pointer changes when other user inserts!
Message
De
21/06/2003 20:56:13
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00802079
Message ID:
00802673
Vues:
26
If you plan to do an APPEND BLANK and an RLOCK, then I think you should turn buffering off; it just doesn't make sense in the current context.

Even then, someone else could lock your appended record before you get a chance to lock it.

What I do is (with MULTILOCKS ON):
IF RLOCK( "0", ALIAS() )        && Lock Header
   APPEND BLANK
   IF RLOCK()
      UNLOCK RECORD 0       && Unlock Header
      ...
   ELSE
      UNLOCK RECORD 0       && Unlock Header
      ...
   ENDIF
ELSE
   ...
ENDIF
UNLOCK ALL
>I do an APPEND BLANK then a RLOCK(). The reason for locking is that the newly appended record often appears in other users sessions even before it is TABLEUPDATEd.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform