can someone show me an example of how to get a sql query to return xml resultset and how to access this resultset?
i have a queery "select * from dtab FOR XML"
I do not get an error when i execute this query however i do not know how to access xml resultset.
Here is a simple sample demonstrating how you can retrieve the XML data returned by your query:
<font class="small">Code:</font><hr /><pre>
Set Cmd = ADO.CreateADOCommand
Cmd.ConnectionString = "..."
Cmd.CommandText = "SELECT CAST ((select * from dtab FOR XML RAW) AS nchar(500))"
Cmd.CommandType = cmdText
Set RecSet = Cmd.Execute
Does it help?
Allen - SmartBear Support