FIX: Table Allows Modification Although DBC is Opened NOUPDATE (192977)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a

This article was previously published under Q192977

SYMPTOMS

If you open a database in Visual FoxPro with the NOUPDATE option of the OPEN DATABASE command, and then you modify the structure of a table contained in that database, you can save changes to the table structure. This can cause the database to become invalid.

RESOLUTION

In the versions of Visual FoxPro previous to 6.0, do not modify a table structure if the OPEN DATABASE command uses the NOUPDATE argument.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual FoxPro 6.0.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Run the following code from a program (.PRG) file:
          CLEAR
          CLOSE DATABASE ALL
          SET SAFETY OFF
          CREATE DATABASE 'TESTDB.DBC'
          CREATE TABLE 'TESTTAB.DBF' NAME 'TESTTAB' (CFIELD C(3) NOT NULL)
          CLOSE DATABASE ALL
          OPEN DATABASE testdb NOUPDATE
          USE testtab EXCLUSIVE
          MODIFY STRUCTURE
          VALIDATE DATABASE
    							
  2. When the Table Designer displays, create an index on the Cfield field and then click the OK button.
  3. Click Yes in the confirmation dialog to make the changes permanent.
  4. Click OK in the "Cannot update cursor" error dialog box.
NOTE: The VALIDATE DATABASE command yields an error that the newly created index is missing from the database container.

REFERENCES


Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbbug kbfix KB192977