MimerFetchScroll

Moves the current cursor position on a scrollable cursor.

A non-scrollable cursor (MIMER_FORWARD_ONLY) may only be read using scroll operation MIMER_NEXT.

Parameters

int32_t MimerFetchScroll (

            MimerStatement statementhandle,

            int32_t operation,

            int32_t offset)

statementhandle

in

A handle returned by MimerBeginStatement[C|8], identifying a prepared statement.

operation

in

A value describing the scroll operation to perform. This value may be either of the following:

MIMER_RELATIVE (0x00000000) - Move to a row number relative to the current position.

MIMER_NEXT (0x00000001) - Move on to the next row.

MIMER_PREVIOUS (0xffffffff) - Move to the previous row.

MIMER_ABSOLUTE (0x40000000) - Move to an absolute row number.

MIMER_FIRST (0x40000001) - Move to the first row of the result set.

MIMER_LAST (0xbfffffff) - Move to the last row of the result set.

offset

in

A parameter to MIMER_RELATIVE and MIMER_ABSOLUTE operation codes.

A relative value of n will move the cursor n rows relative to the current row. An absolute value of n will move to the n:th row of the result set. See Scrolling through a result set for an example of scroll operations.

Returns

A negative value indicating an error, or zero if successful. A value of MIMER_NO_DATA indicates that the end of the result has been reached.

Return value

Description

MIMER_SUCCESS

Success.

MIMER_HANDLE_INVALID

The statementhandle parameter was not recognized as a handle.

MIMER_SEQUENCE_ERROR

There is no open scrollable cursor this statement. Scrollability is determined at compile time with the options parameter to MimerBeginStatement or MimerBeginStatement8.

MIMER_NO_DATA

If the scroll operation ended up on a row without data, that is either before or after the result set.

Other value < 0

Any of the server error codes listed in Return Codes.

Notes

This routine interacts with the database server.

Not Micro API compatible.