Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get XML from a SQL XML query to use with an XMLAdapte
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
How to get XML from a SQL XML query to use with an XMLAdapte
Divers
Thread ID:
00877690
Message ID:
00877690
Vues:
73
I created a cursor adapter [ca] in the [DE] of a form and assigned the SQL below that returns nested XML in Query Analyizer. In VFP 8, my statement "thisform.de.ca.CursorFill" fires without producing an error message but returns a cursor with binary data in it. I would like it to return the appropiate XML that will populate the appropiate tables in and XMLAdapter. Is that possible and if so I am looking for a sample code snippet that will show me to do this.

Thanks,


SELECT 1 as Tag,
NULL as Parent,
Customers.CustomerID as [Customer!1!CustomerID],
NULL as [Order!2!OrderID!element],
NULL as [Order!2!OrderDate],
NULL as [Order!2!ShipName],
NULL as [Order_details!3!ProductID],
NULL as [Order_details!3!UnitPrice],
NULL as [Order_details!3!Quantity]
FROM Customers
WHERE Customers.CustomerID = 'CACTU'
UNION ALL
SELECT 2,
1,
Customers.CustomerID,
Orders.OrderID,
Orders.OrderDate,
Orders.ShipName,
NULL as [Order_details!3!ProductID],
NULL as [Order_details!3!UnitPrice],
NULL as [Order_details!3!Quantity]
FROM Customers, Orders
WHERE Customers.CustomerID = Orders.CustomerID
AND Customers.CustomerID = 'CACTU'
AND Orders.OrderID = 10521
UNION ALL
SELECT 3,
2,
Customers.CustomerID as [Customer!1!CustomerID],
Orders.OrderID,
Orders.OrderDate,
Orders.ShipName,
Order_details.ProductID,
Order_details.UnitPrice,
Order_details.Quantity
FROM Customers, Orders, [Order Details] Order_details
WHERE Orders.OrderID = Order_details.OrderID
AND Customers.CustomerID = 'CACTU'
AND Orders.OrderID = 10521
FOR XML EXPLICIT, xmldata
Robert - Zxytek
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform