Microsoft KB Archive/297830

= FIX: Error Assigning Memo Field To _CLIPTEXT Variable =

Article ID: 297830

Article Last Modified on 5/10/2003

-

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

-



This article was previously published under Q297830



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 (&quot;Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.&quot;)

_CLIPTEXT = test.field1          && This line will produce an error.

_CLIPTEXT = ALLTRIM(test.field1) && This line will not.

Keywords: kbbug kbfix kbxbase kbcodesnippet kbvfp700fix KB297830

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.