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

ID: Q221688


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a, 6.0


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 this to be a bug in the Microsoft products 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:

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

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


MORE INFORMATION

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 : kbservicepack kbOOP kbVFp500abug kbVFp600 kbVFp600bug kbXBase kbVS600sp2 kbVS600SP1 kbVS600sp3fix kbGrpFox
Version : WINDOWS:5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: May 19, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.