FIX: Error Assigning Memo Field To _CLIPTEXT Variable

Article translations Article translations
Article ID: 297830 - View products that this article applies to.
This article was previously published under Q297830
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SYMPTOMS

If you assign the value of a memo field directly to the _CLIPTEXT variable, Visual FoxPro may produce the following error:
Data type mismatch.

RESOLUTION

Use the ALLTRIM() function to convert the memo field into a string before assigning it to _CLIPTEXT.

STATUS

This problem was corrected in Microsoft Visual FoxPro version 7.0 for Windows.

MORE INFORMATION

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 Error
CREATE 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.
				

Properties

Article ID: 297830 - Last Review: February 27, 2014 - Revision: 2.1
APPLIES TO
  • 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
Keywords: 
kbnosurvey kbarchive kbbug kbcodesnippet kbfix kbvfp700fix kbxbase KB297830

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com