[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
V_FLOCK()       Locks the currently selected database

Description:
  Locks the currently selected database file or notifies the user if
  unsuccessful.


Syntax:     
  V_FLOCK()


Pass:       
  Nothing


Return:     
  <expL>   = .T. if successful, otherwise .F.


Notes:      


Example:    
  DO WHILE whatever
     IF .NOT. V_FLOCK()
        ac_msg[1] = "Unable to lock current file"
        ac_msg[2] = "Operation aborted"
        DISPMSG(ac_msg,2,"","")
        INKEY(5)
        EXIT
     ENDIF
     .
     .
     .
  ENDDO
  .
  .
  .


Usage:      
  V_FLOCK() will try to lock the currently selected database file.  If
  it is unsuccessful, a non-screen destructive message stating "Waiting
  for busy network. Press any key to abort." will appear on the screen
  and V_FLOCK() will continue attempting to lock the currently selected
  database file.  If the user aborts the operation by pressing a key,
  V_FLOCK() will return a logical value of false.  If V_FLOCK() returns
  a value of false, it is your job as the programmer to abort the
  operation and recover properly.

See Also: FAKELOCK V_APPEND() V_RLOCK() V_USE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson