Current-result-rowid?

I have:
A browser hBrowser.
Its query hQuery.
The Default buffer handle for the table associated with the query, hDefBuffer.


If I want to reopen the query, and reset it to where it was, I can use:

ASSIGN v-iRow = hQuery:CURRENT-RESULT-ROW.
hQuery:QUERY-OPEN.
hQuery:REPOSITION-TO-ROW(iRow).

This is OK, as long as the records are in the same order. Otherwise, I get sent to whichever record is now in position iRow.

I would like to use
hQuery:REPOSITION-TO-ROWID(rRowid), but I cannot establish the ROWID of the record currently associated with the query.
I would have thought that hDefBuffer:ROWID would provide the solution, but it returns "?".

Any ideas?
 
I've sorted this one out, but thought I should post the solution in case anyone else encounters it.

ASSIGN hTable = hQuery:GET-BUFFER-HANDLE(1).
ASSIGN rRowid = hTable:ROWID.

You can then use
hQuery:REPOSITION-TO-ROWID(rRowid).
 
Top