Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLTOCURSOR Strange Result
Message
From
18/09/2004 00:52:50
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00943638
Message ID:
00943697
Views:
26
Richard,

>Well, it turns out that if an integer field in the XML has a value of zero (0) in the first record of the XML, then XMLTOCURSOR() converts the entire column of the cursor into a logical field with a value of .F....

One simple trick that avoids using a schema is to create a cursor with fields the way you want them and then use the 8192 flag to tell XMLTOCURSOR to append the incoming records to that cursor instead of creating a new one.
* set up the cursor the way you want it
CREATE CURSOR mycursor ( code c(10), id i, amount n(10,2) )
* 8192 flag = append to existing cursor named in second param
* NOTE: If you put a filename in first param, you also need 512 flag
* (8192+512)
XMLTOCURSOR(lcXML, "mycursor", 8192)
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform