Microsoft KB Archive/299849

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:38, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Article ID: 299849

Article Last Modified on 5/12/2003



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



This article was previously published under Q299849

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.


Keywords: kbbug kbfix kbcodesnippet kbdatabase kbvfp700fix KB299849