FIX: XMLToCursor Incorrectly Adds Row When You Use an Inline Schema (316432)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 7.0

This article was previously published under Q316432

SYMPTOMS

The XMLToCursor function erroneously adds a row to a cursor when you use an inline schema.

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.

MORE INFORMATION

Steps to Reproduce Behavior

Save the following code in a program (.prg) file and then run the program:
** CODE BEGIN:
CLEAR
CREATE CURSOR TQUERY (COL1 I, COL2 C(10), COL3 D, COL4 T, COL5 L, COL6 Y)
LCXML = ""
CURSORTOXML("TQUERY","LCXML",1,48,0,"0")
CURSORTOXML("TQUERY","LCXML2",1,48,0,"1")
?  LCXML  && EMPTY XMLDOC WITH NO SCHEMA REF
CLOSE DATA
XMLTOCURSOR(LCXML,"TC1")
?'EXTERNAL SCHEMA RECCOUNT:',RECCOUNT()
XMLTOCURSOR(LCXML2,"TC2")
?'INLINE SCHEMA RECCOUNT:',RECCOUNT()
RETURN
** CODE END
				
After you run the program, note that the record count of the cursor echoed to the desktop for the inline schema is 1.

Modification Type:MajorLast Reviewed:3/2/2002
Keywords:kbbug kbCodeSnippet kbDSupport KB316432