Version: 7.0.0

SQLRowCount ​

Function ​

Obtains the number of rows affected by the most recently executed SQL statement.

Prototype ​

c
SQLRETURN SQLRowCount(SQLHSTMT      StatementHandle,    
                      SQLLEN        *RowCountPtr);

Parameters ​

Table 1 SQLRowCount parameters

Keyword

Parameter Description

StatementHandle

Statement handle.

RowCountPtr

Pointer to a buffer. Upon successful execution, the number of affected rows is written to the address pointed to by this buffer.

Return Values ​

  • SQL_SUCCESS: The call is successful.
  • SQL_SUCCESS_WITH_INFO: Some warning information is present.
  • SQL_ERROR: The execution failed.
  • SQL_INVALID_HANDLE: The input handle is invalid.

Example ​

See: Example