Microsoft KB Archive/318993

= FIX: XMLToCursor Truncates Data on DBCS System =

Article ID: 318993

Article Last Modified on 5/14/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q318993



SYMPTOMS
If you run Visual FoxPro 7.0 on a Double-byte Character Set (DBCS) enabled system, the XMLToCursor function truncates data. The resulting field is only half as long as it should be, and the last half of the data is truncated.



RESOLUTION
To resolve this problem, obtain the latest service pack for Visual FoxPro for Windows 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

316964 How to Obtain the Latest Visual FoxPro for Windows 7.0 Service Pack



STATUS
Microsoft has confirmed that this is a problem in Microsoft Visual FoxPro for Windows 7.0. This problem was first corrected in Visual FoxPro for Windows 7.0 Service Pack 1.



Steps to Reproduce the Problem
Run the following code from Visual FoxPro 7.0 on a DBCS-enabled system (such as Chinese Microsoft Windows 2000): LOCAL lccCharsDB AS STRING

CLEAR CLOSE DATABASES ALL CD JUSTPATH(SYS(16)) lcCharsDB = CHR(191) + CHR(201) + ; CHR(209) + CHR(211) + ; CHR(201) + CHR(236) + ; CHR(152) + CHR(203) + ; CHR(202) + CHR(190) + ; CHR(213) + CHR(90) + ; CHR(209) + CHR(212) CREATE TABLE DBCS (memo1 m) INSERT INTO DBCS VALUES (lcCharsDB) CURSORTOXML(&quot;DBCS&quot;, &quot;MyString.xml&quot;, 1, 512) TYPE MyString.XML XMLTOCURSOR(&quot;MyString.xml&quot;, &quot;MyCursor&quot;, 512) SELECT mycursor BROWSE

USE IN MyCursor USE IN DBCS ERASE MyString.XML ERASE DBCS.DBF ERASE DBCS.FPT Notice that when you browse the table, the memo1 field is only half as long as it should be. The remaining data is truncated.
 * ~ Clean Up

Additional query words: kbVFP700sp1fix

Keywords: kbbug kbfix kbcodesnippet KB318993

-

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

© Microsoft Corporation. All rights reserved.