Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record pointer changes when other user inserts!
Message
From
21/06/2003 20:56:13
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00802079
Message ID:
00802673
Views:
25
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform