Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Move the Cursor to the Next Row

The result set maintains a cursor (that is, a reference) on the current row, initially positioned just before the first row so that you can perform operations on the table. The only way to do operations on the table is through the cursor.

You can move the cursor to the next row, using the following function:

    boolean Query.ResultSet.next(String ResultsetName)

The function returns false when the cursor moves after the last row (or when there is no row).

To get the value of a column in the row referenced by the cursor, pass the index of that column to the following function:

    Object Query.ResultSet.get(String ResultsetName, int ZeroBasedColumnIndex)

The following example shows how you can get the value of column 1 in each row of the result set and simply display it on the console:

    while(Query.ResultSet.next("rset")) {
        System.debugOut(Query.ResultSet.get("rset",1));
    }

Where `"rset"` is the name of the result set.

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.