FIX: Failed TABLEUPDATE Places Record Pointer on Nonexistent Record

This article was previously published under Q299849
This article has been archived. It is offered "as is" and will no longer be updated.
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 RecordCLEARSET EXCLUSIVE OFFSET SAFETY OFFSET MULTILOCKS ONCREATE Table Demo74 ( cTest C(10))INDEX ON cTest TAG cTest CANDIDATEUSE=MESSAGEBOX('Start Part One')USE Demo74=CursorSetProp("Buffering", 5)FOR lnI = 1 TO 10   APPEND BLANK   REPLACE cTest WITH Sys(2015)ENDFORAPPEND BLANKREPLACE 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: 02/28/2014 04:28:21 - Revision: 2.1

  • 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
  • kbnosurvey kbarchive kbbug kbcodesnippet kbdatabase kbfix kbvfp700fix KB299849
Feedback