Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to send parent-child records in single XM
Message
 
 
À
03/06/2006 11:09:10
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01126903
Message ID:
01126943
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>is it possible to send parent-child records in single XML string and use xmladapter to create two seperate cursor for handling data entry at client side.
>
Sure
CLOSE DATABASES 
OPEN DATABASE (HOME(2)) + "Northwind\northwind.dbc"

* Create XML
SELECT 0
USE northwind!OrderDetails 
SET ORDER TO ORDERID   && ORDERID
SELECT 0
USE northwind!Orders 
SET RELATION TO OrderID INTO OrderDetails
oXA = CREATEOBJECT("XmlAdapter")
oXA.RespectNesting = .T.
oXA.AddTableSchema("Orders")
oXA.AddTableSchema("OrderDetails")
oXA.ToXML("Orders.xml",,.T.)
***Modify Command Orders.xml 

CLOSE DATABASES ALL

* Load XML
oXA = CREATEOBJECT("XmlAdapter")
oXA.LoadXML("Orders.xml",.T.)
FOR i=1 TO oXA.Tables.Count
	oXA.Tables(i).Tocursor()
ENDFOR
SET
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform