Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# 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");

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.