FIX: Table Can Not Be USED After REPLACE of Memo in TRANSACTION (190066)
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 Q190066 SYMPTOMS
Your application issues a REPLACE of a Memo field within a transaction. In
a multi-user environment, a user (User 1) issues the REPLACE. After User
1's REPLACE, but before User 1's transaction has completed, another user
(User 2) attempts to open the table. User 2 receives the following
scrolling message until User 1's transaction has completed:
Record not available...please wait.
NOTE: This has been changed in Visual FoxPro 6.0 such that even if the memo
file can not be locked, the table can be opened.
CAUSE
When a REPLACE of a memo field is issued within a transaction, the memo
file header is locked for the remainder of the transaction. If another user
attempts to USE the table, that user can not open the table because the USE
command can not lock the memo file. Once the first user's transaction has
completed, the second user can open the table.
RESOLUTION
One way to work around this issue is to not use REPLACE with Memo field
data within a transaction.
Alternatively, use buffering on the tables with Memo fields, REPLACE memo
values, then cause the update to be written by issuing a TABLEUPDATE()
within the transaction.
Additionally, you do not want to cause the transaction to last any longer
than necessary. Avoid modal dialog boxes, such as message boxes, that pause
program execution, during transactions. Please see the MORE INFORMATION
section for additional details.
STATUS
This behavior is by design. All locks made within a transaction remain
until the transaction has completed. In the case of Memo field, replacing
the Memo field actually locks the memo file header, which prevents the USE
command from opening the table.
REFERENCES
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Jim
Saunders, Microsoft Corporation
Modification Type: | Major | Last Reviewed: | 5/10/2003 |
---|
Keywords: | kbbug kbfix kbprb KB190066 |
---|
|