Paradox Community

Items in pnews.paradox-programming

Subject:Re: lockRecord() - doesn't
Date:Wed, 20 Jul 2022 15:43:44 +1000
From:Tom Krieg <tomkIGNORE@CAPSsdassociates.com.au>
Newsgroups:pnews.paradox-programming
Try to qlocate the record, or move to the record you want, then try

var erc logical endvar
erc= true
if tcu.edit() then
    if tcu.lockrecord() then
       erc = false
       do whatever
    endif
endif
if erc then
    display error
endif

What happens?

open() and edit() doesn't throw an error unless in a try block.



On 20/07/2022 2:26 pm, Peter wrote:
> So I've been playing with this for the better part of the day and I 
> can't figure it out.
> 
> Machine_1
> I place a lockrecord on a record in a table but when I display locks 
> (interactive) it does not show up.
> 
> eg.
> tcu.open(":SCHEDULE:ProcLock.db")
> tcu.edit()
> tcu.lockRecord()    ;//lock 1st record, the only record in the tbl
> 
> If I try programmatically:
>     1) enumlocks(), doesn't show up
>     2) tcu.lockStatus("Any"), doesn't show up
> 
> 
> Machine_2
> When I display locks (interactive) on Machine_2 it also does not display 
> the record lock from Machine_1 - just the open lock.
> 
> If I do it programmatically (enumLock), same thing, the record lock that 
> is set by Machine_1 does not show.
> 
> I don't want to use a table/session lock, just a single record. Any 
> secrets on getting all Machines to recognize a lockRecord()?
> 
> Thanks


Copyright © 2004 thedbcommunity.com