Hola amigo, Me refiero si habias probado la CLAUSULA LOCK que tiene la clase browse...., igual ahora me explico mejor
Error DBFNTX/1022 Lock required
Moderator: Rathinagiri
- SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
- Contact:
Re: Error DBFNTX/1022 Lock required
- Attachments
-
- lock.JPG (72.41 KiB) Viewed 1352 times
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. 
Re: Error DBFNTX/1022 Lock required
Ok Ok amigo.SALINETAS24 wrote: ↑Sat Mar 12, 2022 4:06 pmHola amigo, Me refiero si habias probado la CLAUSULA LOCK que tiene la clase browse...., igual ahora me explico mejor
I've already done it but doesn't work.
Thx
Re: Error DBFNTX/1022 Lock required
Could you use:
ON DBLCLICK {||{IIF(RLOCK(),EDIT("E"),UNLOCK},{MSGBOX('IN USE')}};
ON DBLCLICK {||{IIF(RLOCK(),EDIT("E"),UNLOCK},{MSGBOX('IN USE')}};
All The Best,
Franco
Canada
Franco
Canada
Re: Error DBFNTX/1022 Lock required
Looking for the code in the example, adding only the code
IF FE->( RLOCK() )
FU->FIELD1 := XXX
FU->FIELD2 := XXX
FU->FIELD3 := XXX
FU->FIELD4 := XXX
ENDIF
it works!
how is it possible? What does that statement do?
Re: Error DBFNTX/1022 Lock required
I use this a lot in my grids and browses.
It only allows the edit if it gets a lock.
you can try taking out the unlock, then try the second edit with same code, It should not get a lock because the first edit has it locked.
in first edit
ON DBLCLICK {||{IIF(RLOCK(),EDIT("E"), },{MSGBOX('IN USE')}};
It only allows the edit if it gets a lock.
you can try taking out the unlock, then try the second edit with same code, It should not get a lock because the first edit has it locked.
in first edit
ON DBLCLICK {||{IIF(RLOCK(),EDIT("E"), },{MSGBOX('IN USE')}};
All The Best,
Franco
Canada
Franco
Canada
Re: Error DBFNTX/1022 Lock required
Code: Select all
FU->(dbGoTo ( CDL2A.Br_cassaout.Value ))
IF RegEnRed( "FU" )
FU->FIELD1 := XXX
FU->FIELD2 := XXX
FU->FIELD3 := XXX
FU->FIELD4 := XXX
ELSE
MsgInfo("No se pudo grabar el Registro...","Verifique" )
ENDIF
UNLOCK
RETURN NIL
FUNCTION RegEnRed( cArea )
DO WHILE ! ( cArea )->( RLock() )
IF ! MSGRetryCancel( "Registro usado por otro Usuario", cArea )
RETURN .F.
ENDIF
ENDDO
RETURN .T.
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: Error DBFNTX/1022 Lock required
Jimmy,
My first post is the proper way. It unlocks on return.
My second post was for Carl to test his second use of same record in second table to see that he could not get lock as it was still locked in first.
My first post is the proper way. It unlocks on return.
My second post was for Carl to test his second use of same record in second table to see that he could not get lock as it was still locked in first.
All The Best,
Franco
Canada
Franco
Canada