PRB: LUPDATE() Does Not Return Date of Last Update

Last reviewed: June 27, 1995
Article ID: Q130165
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

When using a shared table, the LUPDATE() function does not return the date when the table was last updated.

CAUSE

When a shared table is updated, the 'date of last update' will not be adjusted until the table is closed.

The date of last update is stored in the header of the .DBF file. The LUPDATE() function reads the date of last update from the header of the .DBF file. When a change is made to a table that is used in shared mode, the last update information in the header of the .DBF file is not updated to reflect this fact until the table is closed. The header information is not updated each time a change is made to the table because doing so would adversely impact performance.

RESOLUTION

Close the table before calling the LUPDATE() function. If this is not feasible, store the date of last update into a memory variable before updating the table.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Share a table between two computers. This table should have a "date of last update" that is earlier than today's date.

    CREATE TABLE mytable (cbill C(1)) INSERT INTO mytable (cbill) VALUES ("a") INSERT INTO mytable (cbill) VALUES ("b")

  2. Run the following code as indicated:

    computer 1: use mytable shared

                   ? lupdate()  && shows date last updated
    
       computer 2: use mytable shared
                   =flock()
                   replace cBill with "1"
                   unlock
                   ? lUpdate()  && shows old date
    
       computer 1: ? lUpdate()  && shows old date
    
       computer 2: flush
                   ? lUpdate()  && shows old date
    
       computer 1: =flock()
                   ? lUpdate()  && shows old date
    


Additional reference words: FoxWin 2.60a
KBCategory: kbprg kbprb
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.