BUG: Spell Checking on Memo Field Causes Error (163798)
The information in this article applies to:
- Microsoft Visual FoxPro for Macintosh 3.0b
- 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
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q163798 SYMPTOMS
Invoking the Spell Checker on a Memo field in a multi-user situation will
cause the following warning:
"Memo field could not be locked for Spell Checker"
This warning occurs if the record is currently locked by another user.
CAUSE
The Spell Checker is ignoring the Optimistic Record Locking scheme of the
Form.
RESOLUTION
Place the following code in the DoubleClick Method of Edit Region:
&& Copy current record to a separate file to avoid locking problem
COPY NEXT 1 TO spellchk.dbf
USE spellchk IN 0
SELECT spellchk
&& The following line may be added if the user wants changes
&& made to the buffered data appearing in Spell Checker. The reason
&& for this is the COPY TO command is reading directly from dbf file
&& on disk rather than the buffered data appearing in Edit region.
REPLACE spellchk.notes WITH THIS.VALUE
&& Run SpellChecker on the temporary table
MODIFY MEMO notes NOWAIT
DO (_SPELLCHK)
CLOSE MEMO notes
&& Update Edit Region and original table with any changes made
&& by user/SpellChecker
THIS.VALUE=spellchk.NOTES
USE && Close the temporary table
SELECT employee
THIS.REFRESH() && Update the Edit Region
&& Erase the temporary files created
ERASE spellchk.dbf
ERASE spellchk.fpt
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
REFERENCES
For more information about spell checking in FoxPro, please see the
following articles in the Microsoft Knowledge Base:
117212 How to Use the FoxPro Spelling Checker (SPELLCHK.APP)
136641 PRB: Spell Checking Edit Box Contents Does Not Work
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbBug KB163798 |
---|
|