Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HOw TO Lock a table or a record in Multiuser Environment
Message
From
20/06/2002 12:14:22
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00670469
Message ID:
00670694
Views:
11
It is simplest to select the correct table, move to record number three (whatever way you choose, locate, skip, seek, scan, etc...) and then issue rlock()
*--Your table should be in the current work area and the record
*--pointer should be at record number 3 then issue the below code
*--or something similar
IF RLOCK()
   *--do your replacement
   gather memvar memo
   *--now unlock the record
   UNLOCK
ELSE
   MESSAGEBOX('Could not save changes!',16,'ERROR',50000)
ENDIF
>If Rlock() use to lock then how the syntax or the samples of it...
>for instance i have records
>===========
> N J
>===========
>| 1 | A
>| 2 | B
>| 3 | D
>| 4 | D
>===========
>
>I want to lock record no 3 and want to change or edit "D" with "C"
>is it correct if i use :
>
>RLOCK(3)
>
>
>then if other users want to make a change to that records also they have to
>check
>
>If Rlock(3) then
>....
>endif
>
>is that correct also...
>
>please give me solution about this cause i really confuse of it...
>
>thanks....
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform