Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLTOCURSOR Strange Result
Message
De
18/09/2004 00:52:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00943638
Message ID:
00943697
Vues:
25
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform