To retrieve and process a single result set from a component:
Call the component method on the stub instance that returns a result set.
Iterate through each row and then each column in a row by using nested for loops.
Use the discriminator method (_d) to retrieve the datatype of the column in a row and switch/case syntax to process the column values (such as printing the column values).
To retrieve and process multiple result sets returned from a component method as a TabularResults::ResultSets object:
Call the component method on the component reference that returns the result sets.
Retrieve the length or number of result sets.
Iterate through the result sets using a for loop.
For each result set, iterate through each row and then each column in a row by using nested for loops.
You can treat a ResultSets object as an array of ResultSet objects. On each iteration, retrieve a reference to each ResultSet object by using the subscript [ ] operator.
Use the discriminator method (_d) to retrieve the datatype of the column in a row and switch/case syntax to process the column values (such as printing the column values).
Copyright © 2005. Sybase Inc. All rights reserved. |