FIX: Error Assigning Memo Field To _CLIPTEXT Variable

This article was previously published under Q297830
This article has been archived. It is offered "as is" and will no longer be updated.
If you assign the value of a memo field directly to the _CLIPTEXT variable, Visual FoxPro may produce the following error:
Data type mismatch.
Use the ALLTRIM() function to convert the memo field into a string before assigning it to _CLIPTEXT.
This problem was corrected in Microsoft Visual FoxPro version 7.0 for Windows.
Information stored in the _CLIPTEXT variable is available to be pasted as if it had been placed on the Clipboard using Cut or Copy operations.

In Visual FoxPro 6.0 and earlier, the following code produces the error:
*!* Q297830 FIX: Assigning Memo Field To _CLIPTEXT Variable Causes ErrorCREATE CURSOR test (field1 M)INSERT INTO test ;   VALUES ("Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.")_CLIPTEXT = test.field1           && This line will produce an error._CLIPTEXT = ALLTRIM(test.field1)  && This line will not.				

Article ID: 297830 - Last Review: 02/27/2014 21:08:27 - Revision: 2.1

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

  • kbnosurvey kbarchive kbbug kbcodesnippet kbfix kbvfp700fix kbxbase KB297830