FIX: Failed TABLEUPDATE Places Record Pointer on Nonexistent Record

Article translations Article translations
Article ID: 299849 - View products that this article applies to.
This article was previously published under Q299849
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

SYMPTOMS

When you run multiple instances of Visual FoxPro (VFP) and a TABLEUPDATE fails, the record pointer is on a nonexistent record.

STATUS

This problem was corrected in Visual FoxPro version 7.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Paste the following code in a new program in VFP version 3.0, 5.0, or 6.0.
    *!* Q299849 FIX: Failed TABLEUPDATE Places Record Pointer On Nonexistent Record
    CLEAR
    SET EXCLUSIVE OFF
    SET SAFETY OFF
    SET MULTILOCKS ON
    CREATE Table Demo74 ( cTest C(10))
    INDEX ON cTest TAG cTest CANDIDATE
    USE
    =MESSAGEBOX('Start Part One')
    USE Demo74
    =CursorSetProp("Buffering", 5)
    FOR lnI = 1 TO 10
       APPEND BLANK
       REPLACE cTest WITH Sys(2015)
    ENDFOR
    APPEND BLANK
    REPLACE cTest WITH '12345'
    =MESSAGEBOX('Start Part Two')
    ? 'Reccount(), Recno() ', Reccount(), Recno()
    ? 'GetFldState(-1) ', GetFldState(-1)
    * Comment out the next line if running in VFP 3.
    ? 'TableUpdate(1, .t.) ', TableUpdate(1, .t.)
    *Uncomment the next line if running in VFP 3.
    * ? 'TableUpdate(1, .t.) ', TableUpdate(.t., .t.)
    ? 'Reccount(), Recno() ', Reccount(), Recno()
    ? 'GetFldState(-1) ', GetFldState(-1)
    ? 'Eof() ', Eof()
    *Uncomment the next line if running in VFP 3.
    * =TableRevert(.t.)
    USE
    					
  2. Save and run the code (the name is unimportant).
  3. Start another instance of VFP and run the same code.
  4. Switch to the first instance of VFP and click Start Part One.
  5. Switch to the second instance of VFP and click Start Part One.
  6. Switch to the first instance and click Start Part Two.
  7. Switch to the second instance and click Start Part Two. The record pointer in the second instance is on a record that does not exist in the table.

Properties

Article ID: 299849 - Last Review: February 28, 2014 - Revision: 2.1
APPLIES TO
  • Microsoft Visual FoxPro 3.0 Standard Edition
  • Microsoft Visual FoxPro 3.0b Standard Edition
  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 5.0a
  • Microsoft Visual FoxPro 6.0 Professional Edition
Keywords: 
kbnosurvey kbarchive kbbug kbcodesnippet kbdatabase kbfix kbvfp700fix KB299849

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com