FIX: Index Corruption When Table is Used in Read-Only Mode (195623)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q195623 SYMPTOMS
Under a specific set of circumstances, the indexes of a table do not
properly update when you append or insert records into a table that you
have opened in a private data session of two or more forms.
CAUSE
This behavior occurs with the following conditions and sequence of events:
- A table is first USEd in read-only mode or with the NOUPDATE clause in a private data session of a form.
- The same table is USEd in read/write mode in a private data session of a second form.
- A new record is inserted into the table from the second form.
- The following sequence of commands is executed in the second form:
BEGIN TRANSACTION
TABLEUPDATE()
END TRANSACTION
RESOLUTION
Depending on the needs of the developer, the following two workarounds can
be used for this problem:
- If it is not essential to USE tables in read-only mode or with the NOUPDATE clause, you might elect the following:
- Use shared tables in the default data session
-or-
- Use shared tables in read/write mode in the open forms
-OR-
- If it is necessary or desirable to USE tables in read only mode or with the NOUPDATE clause, in one or more forms, the developer may elect the
following:
- Instantiate the forms using shared tables, opened in read-only mode, after instantiating forms USEing shared tables in read/write mode.
-or-
- Avoid issuing a TABLEUPDATE() command within a transaction.
-or-
- Issue a REINDEX command after closing the form(s) using the shared table.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base: 194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbDatabase kbVS600sp3fix KB195623 |
---|
|