Subject: | Re: Locks
| Date: | Fri, 8 Feb 2019 17:30:02 -0800
| From: | Peter <peter@removespamwhiteknight.email>
| Newsgroups: | pnews.paradox-programming
|
Hmm, seems to make a difference if the table Name.db is added to
datamodel of the form on Computer 2.
On 02/08/2019 05:07 PM, Peter wrote:
> Something I am not understanding about locks
>
> Computer 1
> A form with a table ("Name.db") in the datamodel
> A button with code to put a full lock
> :pushbutton:
> if lock(":PROFILES:Name.DB","Full") then
> view("Full locks successfull")
> else
> errorShow()
> endIf
>
> Computer 2 (for testing)
> A form, no table in datamodel.
> A button with code to put a full lock on the same tbl
> :pushbutton:
> tcu.open(":profiles:Name")
> if not tcu.lock("Full") then
> errorShow()
> else
> view(tcu.lockStatus("Full")
> endIf
> --------------------------------
> The experiments
>
> Step 1
> Computer 2, pushbutton, view = "1" (full lock) as expected
> Interactive Pdox select Tools|Security|Display Locks... - shows only an
> open lock for Computer 2
> Conclusion: Interactive "display locks" does not show explicitly placed
> locks for same net session
>
> Step 2
> Computer 1, place full lock - successful (wth?)
> Interactive Pdox select Tools|Security|Display Locks... - shows only one
> lock for Computer 1, "Exclusive"
> Conclusion: Conclusion in Step 1 is wrong
>
> How can Computer 1 place a full lock when tcursor on Computer 2 has a
> full lock already?
>
> Step 3
> Computer 2, Interactive Pdox select Tools|Security|Display Locks... -
> fails because Computer 1 has "Exclusive" lock, as expected.
>
> Bottom Line Question
> How come Computer 2 recognizes the lock placed by Computer 1 but
> Computer 1 does not recognize the lock placed by Computer 2?
>
> Thank you.
>
> Peter
|