Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_badlock() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_BADLOCK()


Returns

Number of the record that caused N_MLOCK() to fail.


Example

IF !N_MLOCK(cRecList)
   ? 'Could not lock record number ', N_BADLOCK()
ENDIF

// Lock records where State = 'WA'.
// (Assume the index is by state.)
SEEK 'WA'
DO WHILE State == 'WA'
   cLockList = cLockList + LTRIM(STR(RECNO())) + ','
   SKIP
ENDDO

N_TIMEOUT(10) // Retry locks up to ten times

IF N_MLOCK(cLockList)
   // Records locked.

ELSE
   // Records not locked.
   ? 'Could not lock record number ', N_BADLOCK()
ENDIF



See Also: N_MLOCK()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson