Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get XML from a SQL XML query to use with an XMLAdapte
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
How to get XML from a SQL XML query to use with an XMLAdapte
Miscellaneous
Thread ID:
00877690
Message ID:
00877690
Views:
72
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
Next
Reply
Map
View

Click here to load this message in the networking platform