APPEND BLANK Can Cause Database Header Contention

ID: Q99613

The information in this article applies to:

SYMPTOMS

Error 108, "File is in use by another," occurs if multiple workstations on a network perform a APPEND BLANK command simultaneously.

CAUSE

The database header is briefly locked by the APPEND command, preventing access by multiple users.

RESOLUTION

Either of the following methods can be used to solve this problem:

1. Add a SET REPROCESS TO <number of retries> command as the first line

   of code in the program. For example:

      SET REPROCESS TO 30   && Or appropriate interval.
      SELECT <some database name>
      FOR i = 1 TO 1000
        APPEND BLANK
      ENDFOR

2. Add an ON ERROR DO <error handling routine> command as the first
   line of code in the program. Also add the required ON ERROR routine.
   For example:

      ON ERROR DO ERRHANDL
      SELECT <some database name>
      FOR i = 1 TO 1000
        APPEND BLANK
      ENDFOR

      PROCEDURE ERRHANDL
      * Get the error number.
      m.errcode = ERROR()
      * Get the currently executing line of code.
      m.execline = MESSAGE(1)
      * Retry when error 108 occurs on APPEND BLANK.
      IF m.errcode = 108 .AND. UPPER(m.execline) = "APPEND BLANK"
         RETRY
      ENDIF

MORE INFORMATION

This problem can be reproduced by allowing two or more workstations to execute the following code:

   SELECT <some database name>
   FOR i = 1 TO 1000
     APPEND BLANK
   ENDFOR

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a REPROCESS KBCategory: kbprg KBSubcategory: FxnetworkGeneral

Last Reviewed: June 27, 1995