Obtain Results Using a Result Set

The Query.Statement.execute() function returns values in a result set.

The result set is a tabular form (with rows and columns) on which you can perform operations to return data. It is used for snapshot queries only. Execution is synchronous.

Query.Statement.execute(String StatementName, String resultsetName);

For example:

Query.Statement.execute(S_Id, evt@extId);

In the example, S_Id is a string variable providing the name that was given in the Query.Statement.open() function. The example shows use of the external ID of event evt (evt@extId) as the result set name, as a way to ensure that each result set has a unique name.

See Result Set Data Usage (Snapshot Queries) for more information.

Close the Result Set after Collection

After you have collected the data you need, close the result set. You can close the result set directly, or close it indirectly by closing a higher-level item such as the statement or the query definition. To close the result set use the following function:

Query.ResultSet.close(String ResultsetName);

For example:

Query.ResultSet.close("rset");