Utility Functions and C Language Reference > Virtual Table Server Functions (VTS) for C, C#, and Java > Virtual Table Server (VTS) Functions for Multiple Connections > Alphabetical Listing > vtc_increment

vtc_increment

Deprecated. Use lrvtc_increment. Increments a counter stored in a field.

C Language

int vtc_increment ( PVCI2 pvci,  char *columnName, int rowIndex, int incrValue, int *outValue );

C# Language

int vts_multi.increment ( int pvci,  string columnName, int rowIndex, int incrValue );

Java Language

int Vtc.increment (  long pvci,  string columnName, int rowIndex, int incrValue , OutIntParameter outValue);
Data Update Functions

Arguments

Name Comments
pvci The server connection handle.
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.
outValue The new value of the field.

vtc_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

Returns 1 on success and 0 on failure.

Parameterization

All string input arguments can be passed using standard parameterization.

C Language Example

int rc = 0;
int newValue = 0;

// Increment Col1 row#1 by 1
rc = vtc_increment(pvci, "Col1", 1, 1, &newValue);

    

C# Language Example

.Net Multiple Connection Example

Java Language Example

Java Multi-Connection Example