Microsoft KB Archive/316439

= FIX: XMLToCursor Gives &quot;Syntax Error&quot; or C0000005 Error Message with More Than 128 Columns =

Article ID: 316439

Article Last Modified on 3/2/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q316439



SYMPTOMS
The XMLToCursor function may report one of the following errors when it encounters more than 128 columns:

Fatal Error: Exception code=C0000005

-or-

Syntax Error



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 Behavior
Save the following code in a program (.prg) file and then run the program: CLEAR LOCAL lafieldinfo[FIELDCOUNT,16] FOR lni = 1 TO FIELDCOUNT lafieldinfo[lni,1] = FIELDNAME +PADL(TRANSFORM(lni),3,'0') lafieldinfo[lni,2] = &quot;C&quot; lafieldinfo[lni,3] = 5 lafieldinfo[lni,4] = 0 lafieldinfo[lni,5] = .F.  lafieldinfo[lni,6] = .F.   FOR lnj = 7 TO 16 lafieldinfo[lni,lnj] = &quot;&quot; ENDFOR ENDFOR CREATE CURSOR TABNAME FROM ARRAY lafieldinfo APPEND BLANK ?(LEN(FIELDNAME)+3)*FIELDCOUNT ??CURSORTOXML(ALIAS,'cXML',1,0) USE IN TABNAME =XMLTOCURSOR(cXML,'cur') RETURN
 * 1) define FIELDCOUNT     128
 * 2) define TABNAME    &quot;testtab&quot;
 * 3) define FIELDNAME  &quot;fieldnu&quot;
 * 4) define STRUTAB    &quot;Strutable.dbf&quot;

Additional query words: kbVFP700sp1fix

Keywords: kbbug kbfix kbcodesnippet kbvfp700fix KB316439

-

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

© Microsoft Corporation. All rights reserved.