Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need XML from a table
Message
 
À
30/08/2001 00:06:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00549739
Message ID:
00551014
Vues:
26
>>Hmmmm.... it doesn't work right for me...
>>
>>I sort of get the data from SQL Server - it'll have a blank line at the top and an extra ElementType column (which is presumably from the schema).
>>
>>Here's what I'm doing to test (against SQL Server's Pubs database queried through IIS):
>>
>
>Ok, yeah I had forgotten that you can get that when you specify XMLDATA in the query. You get all the records and all the fields when you leave that off though, it's just that XMLToCursor has to guess at the field types. It usually does a pretty good job at this, but it can get screwed up with say, a character field that contains all numbers.

I have lots of problems with XMLTOCURSOR() guessing. Dates for example almost always end up as strings.

The problem *with* the schema is a bug... that should work.

>FWIW, VFP still screws up the data types when you specify XMLDATA, even though the schema is right there. Notice in the results in your example that the zipcode field is numeric.

Yeah, it's like I said XMLTOCURSOR() really works right only if you feed it data that comes with the same schema as the CURSORTOXML() generates. Beyond that you're gambling on VFP trying to guess...

Not happy with the design of that function... <s>

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform