Share this page

# lrvtc_increment

Increments a counter stored in a field.

## C Language

    VTCERR2 lrvtc_increment ( char *columnName, int rowIndex, int incrValue );

## C# Language

    int vts.increment ( string columnName, int rowIndex, int incrValue );

## Java Language

    int Lrvtc.increment ( string columnName, int rowIndex, int incrValue );

Data Update Functions

## Arguments

Name | Comments
--- | ---
columnName | The column name.
rowIndex | The row number. The first row has index 1.
incrValue | The amount to change the field value by. If incValue is negative, it is subtracted from the field value.

lrvtc_increment changes the value in the field by the amount passed in argument incrValue.

If the cell value cannot be converted to an integer or if there is no data in the cell, the cell value after the vtc_increment call is the `incrValue` argument value.

## Return Values

The new value of the field.

## Parameterization

All string input arguments can be passed using standard parameterization.

## C Language Example

        int newcredit = 0;
        ...
        newcredit = lrvtc_increment("C_credit", 1, 10);
        lr_log_message("New credit=%d\n", newcredit);

## C# Language Example

.NET Single Connection Example

## Java Language Example

Java Single Connection Example

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