SqlCursorInfo%

Returns the number of columns and the number of rows in the keyset for a client cursor, a transparent server cursor, or an explicit server cursor. The SqlCursorInfoEx% function returns more detailed information.

Syntax

SqlCursorInfo% ( cursorhandle%, ncols%, nrows& )

where

cursorhandle%
Is the cursor handle created by SqlCursorOpen%.
ncols%
Is a program variable that will contain the number of columns in the cursor.
nrows&
Is a program variable that will contain the number of rows in a cursor results set.

Client cursor:

For a keyset cursor, this number is always valid. For a dynamic cursor, this number is valid only if the current fetch buffer contains the last row in the cursor results set; otherwise, - 1 is returned.

Transparent server cursor, explicit server cursor:

For a dynamic cursor, - 1 is returned.

For a keyset cursor, this value can be the number of rows populated if asynchronous population of the cursor results set is incomplete, or the total number of rows in the cursor results set. You can call SqlCursorInfoEx% to determine this.

Returns

SUCCEED (1) or FAIL (0).

Remarks

Call SqlCursorInfoEx% for more complete information about transparent server cursors and explicit server cursors.

See Also

SqlCursor%, SqlCursorClose, SqlCursorColInfo%, SqlCursorFetch%, SqlCursorInfoEx%, SqlCursorOpen%