Browsing a Table While Using Row Buffering in a Form

Last reviewed: October 18, 1996
Article ID: Q131711
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 5.0

SUMMARY

If a form uses row buffering, a table that is browsed from the Command window may display uncommitted changes. This article describes factors involved in browsing buffered data.

MORE INFORMATION

When buffering is enabled, data is copied to a cursor. All the editing takes place in the cursor. With row buffering, data is committed when the record pointer moves, or when a TABLEUPDATE() function is issued. In particular, data is written to disk when a SKIP command is issued, another work area is selected, or the table is closed.

The BufferMode property of a form determines the buffering mode if the BufferModeOverride property of a cursor is set to 1 (Default). If the BufferMode property is set to 1 or 2, any cursor used by a grid control is enabled for table buffering. Any other control bound to data uses row buffering. Buffering can also be set in the BufferModeOverride property of a cursor in the data environment.

For example, consider a form that contains a text box control bound to a field in the table. If the BufferMode property is set to 2 (Optimistic), optimistic row buffering is enabled. If a BROWSE command is issued from the Command window while the form is running, the following can take place:

  • If the form uses a global data session, the BROWSE command and the form use the same cursor. Any change made to the cursor is displayed in the Browse window.
  • If the form uses a private data session, the BROWSE command and the form might use different data. The BROWSE command when issued from the Command window uses the global data session. Because two sessions are used, the table is reopened and the values displayed in the Browse window are the values stored in the table on disk. In this case, only committed changes are displayed in the Browse window.

Use the CURVAL() function to query the field values from disk. In a multiuser situation, use the OLDVAL() function to return the original values from disk.

For more information about buffering, search for "Buffering Access to Data" in the Visual FoxPro Help menu.


Additional reference words: 5.00 3.00 VFoxWin lan network multi-user
KBCategory: kbprg kbnetwork
KBSubcategory: FxprgMultiuser


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: October 18, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.