Share this page

# lrd_row_count

Returns the number of the rows affected by an UPDATE, DELETE or INSERT statement.

`LRDRET lrd_row_count( LRD_CURSOR * mptCursor, long * mpliRowCount, int miDBErrorSeverity );`

mptCursor | A pointer to an LRD_CURSOR structure.
mpliRowCount | A pointer to the number of affected rows.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_row_count function returns the number of the rows affected by an UPDATE, DELETE or INSERT statement. It is only supported for ODBC Vusers.

Note: When working in ODBC, you must issue this statement immediately after the UPDATE, DELETE or INSERT operation. Otherwise , the result may be inaccurate.

For more details refer to the Function Header File lrd.h in the include directory.

## Return Values

See LRD Return Values.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, lrd_row_count indicates the number of affected rows after the execution of an UPDATE command.

Copy code

    int jRowCount;
    lrd_open_cursor(&Csr1, Con1, 0);
    lrd_stmt(Csr1, "update TestTable set col = 150 where col = 140", -1, 1, 0, 0);
    lrd_row_count(Csr1, &jRowCount, 0);
    lrd_close_cursor(&Csr1,0);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: