Page 1 of 1

Lock Required

PostPosted: Wed Jan 25, 2006 10:20 am
by deanomeano
when the ok button in my program is pressed the information in the dialog is saved to a DBF, below is the code, the error (COMIX 1022) i get says that a lock is required. i have tried TRANSFIL->(RECLOCK()), but this does not work??

CODE;

STATIC FUNCTION SaveInspect //Dean

REPLACE TRANSFIL->CONT_LEVEL WITH mContLevel
REPLACE TRANSFIL->COLOUR WITH mColour
REPLACE TRANSFIL->PACK_LEVEL WITH mPackLevel
REPLACE TRANSFIL->POST_CONT WITH mPostCont

IF mRubble == .T.
REPLACE TRANSFIL->RUBBLE WITH mRubble
ENDIF

IF mHardBoard == .T.
REPLACE TRANSFIL->HARDBOARD WITH mHardboard
ENDIF

IF mTreated == .T.
REPLACE TRANSFIL->TREATED WITH mTreated
ENDIF

IF mFerrous == .T.
REPLACE TRANSFIL->FERROUS WITH mFerrous
ENDIF

IF mOrganic == .T.
REPLACE TRANSFIL->ORGANIC WITH mOrganic
ENDIF

RETURN nil

PostPosted: Thu Jan 26, 2006 10:47 am
by Antonio Linares
Deano,

> TRANSFIL->(RECLOCK())

It should be:

TRANSFIL->( RLOCK() )