Share this page

# vtc_update_message_ifequals

Deprecated. Use lrvtc_update_message_ifequals. Replaces the data in a field if the current data equals a given value.

## C Language

    VTCERR2 vtc_update_message_ifequals ( PVCI2 pvci,  char *columnName, int rowIndex, char *newValue, char *ifEqualValue, unsigned short *outRc );

## C# Language

    bool vts_multi.update_message_ifequals ( long pvci,  string columnName, int rowIndex, string newValue, string ifEqualValue);

Data Update Functions

## Arguments

Name | Comments
--- | ---
pvci | The server connection handle.
columnName | The column to write to.
rowIndex | The number of the row. The first row has index 1.
newValue | The value to set the field to.
ifEqualValue | The value to compare the current value of the field to.
outRc | The status of the operation: 1 - Pass or 0 - Fail

vtc_update_message_ifequals writes the value to the field specified with the column name and row index if the value of the field when vtc_update_message_ifequals is called is equal to the ifEqualValue. If the ifEqualValue and the field value match, the field value is overwritten.

## Return Values

Returns zero on success or one of the Error Codes.

C# Language: Returns true on success.

## Parameterization

All string input arguments can be passed using standard parameterization.

## Example

    int rowNumber, rc = 0;
    unsigned short 	status;
       ...
    rc = vtc_update_message_ifequals(pvci, "Col1",
             rowNumber,
             "coming soon...",
             "out of stock",
             &status);
    if (status == 1) {
    	// success: value changed to "coming soon..."
    } else {
    	// failure: value did not change.
    }

## C# Language Example

.NET Multiple 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: