SQL_GET_NUM_ROWS¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This command is used to get the number of rows retrieved from a result set of an SQL expression. It cannot be used when binding the result set to the record buffer.

Note: The number of rows may not always be available, depending on server and cursor types.

Syntax

SQL_GET_NUM_ROWS to {variable}

Parameter

Description

variable

Variable to hold the number of rows

Example

Integer iNumRows

SQL_SET_STMT to "SELECT * FROM CUSTOMER WHERE STATUS = 'Active'"
SQL_PREPARE_STMT
SQL_EXECUTE_STMT
SQL_GET_NUM_ROWS to iNumRows
Showln iNumRows