>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