Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLTOCURSOR Strange Result
Message
De
17/09/2004 19:47:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00943638
Message ID:
00943668
Vues:
18
>I have a project taht returns an XML file from a PDA which gets imported to a VFP 8.0 application. I use the XMLTOCURSOR() function to get a cursor with which I can process the results. In testing, all worked well. And, of course, as we usually do, I had fairly small XML's to import for test purposes. When I put the project into live action, the working sets got much larger than I tested with and I began getting reports of 'Data Type Mismatch' when uploading the XML.
>
>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. This was true of fields with floating point values too, but I got around that by defaulting the value to 0.0 and then the parser seemed to work. I was able to do a bit of fudging and made sure that the first record in the XML always had a non-zero value in it so the project can continue, but this is a kludge and not the best of practices.
>
>It's interesting that this only occurred when the XML got large (like 800 records or larger) and the parsing operated correctly on smaller files.
>
>If anyone has a better solution than forcing a value into the first integer field, I would appreciate a response.
>
>Dick Harrold

Dick,
With schema does it happen? AFAIK w/o schema if a column only have 0/1's it's interpreted as logical.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform