Microsoft KB Archive/221688

= FIX: _VFP.Eval Only Accepts Strings of 255 Characters or Less =

Article ID: 221688

Article Last Modified on 10/16/2002

-

APPLIES TO


 * 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 Q221688



SYMPTOMS
The Eval method of the _VFP system variable cannot accept a string longer than 255 characters.

In Visual FoxPro 6.0, the following error appears:

OLE exception code 0 from Visual FoxPro for Windows:10 :Syntax error...

In Visual FoxPro 5.0x, this error appears:

OLE exception code 0 from Visual FoxPro for Windows: Syntax error...

This problem normally occurs when a COM client is calling the EVAL method on the Visual FoxPro server.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



Steps to Reproduce Behavior
In the Command window, type the following line of code:

_vfp.EVAL("MESSAGEBOX('" + REPLICATE("a",242) + "')")

The error mentioned in the Symptoms section appears.

NOTE: The MessageBox function is 12 characters, two more for the quotes and then replicating the letter "a" 242 times makes 256 characters within the _vfp.EVAL function.

Additional query words: KBDSE

Keywords: kbbug kbfix kbxbase kboop kbvs600sp3fix KB221688

-

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

© Microsoft Corporation. All rights reserved.