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.