Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting XML from queries
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01353485
Message ID:
01353536
Vues:
11
Hi Mike,

I had no problem converting resulting XML from following query into a VFP cursor with XMLTOCURSOR(). I run query using SPT from VFP. I'm not sure why do you need SSMS for that.
SELECT TOP 3 * FROM Production.Product FOR XML AUTO, ROOT('root')
>I am running queries in the Sql Manager and getting the result set in XML. When I save the XML result I xcannot read it with XmlToCursor() or the XmlAdapter class.
>
>I have used the following syntax strings in my query:
>
>select * from mytable for xml raw
>
>select * from mytable for xml raw, elements, xmlschema
>
>select * from mytable for xml raw, elements, xmlschema, root('mydata')
>
>select * from mytable for xml auto
>
>select * from mytable for xml auto, elements, xmlschema
>
>select * from mytable for xml auto, elements, xmlschema, root('mydata')
>
>I also tried the XmlDate directive as well and many other variations.
>
>When I try to read it with Fox I get error, "Only one top level element is allowed in an XML Document". Does anyone have an idea on the proper syntax to get a result set in Xml that I can take as generated and I can save to a drive and read with Fox?
>
>
>Thanks,
>
>MW
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform