It is not documented, but the OutputProperties property is an XML document. It contains the result set. I'm using the Flights sample app database in these examples. Reference it like this:
XmlDocument xdoc = this.DbFetchData12.OutputProperties; // OutputProperties is an XML document
XmlNodeList rows = xdoc.SelectNodes(''//ResultTable/Row''); // Grab all of the ''Row'' elements
foreach (XmlNode row in rows) // Iterate the row elements
{
// do something with the row
var flightNumber = row.SelectSingleNode(''Flight_Number'').InnerText;
}
Or, if you want to grab a specific row, you can leverage XPath more specifically:
XmlDocument xdoc = this.DbFetchData12.OutputProperties; // OutputProperties is an XML document
XmlNode row = xdoc.SelectSingleNode(''//ResultTable/Row[Flight_Number=1124]''); // Grab row
// do something with the row
var departure = row.SelectSingleNode(''Departure'').InnerText;
Your XPath can be modified to extract the row or rows you need to process.
You will need to know what your XML result set looks like in order to build your XPath. One way to do this is to write the ResultTable element to the log, like so:
XmlDocument xdoc = this.DbFetchData12.OutputProperties; // OutputProperties is an XML document
this.Context.UserLogger.Info(xdoc.SelectSingleNode(''//ResultTable'').OuterXml);
This will display the xml document in the Output window and in the user log file. Access the user log via ST 11 menu like so:
Test -> Open Script Directory -> Log -> vtd_user.txt.
Update : An easier way to get the field names you'll need to use in your XPath is via the Property Sheet for the Select Data activity:
![alt text][1]
[1]: /upfiles/ST11ResultSetFields.PNG