lrvtc_update_message_ifequals
Replaces the data in a field if the current data equals a given value.
C Language
VTCERR2 lrvtc_update_message_ifequals ( char *columnName, int rowIndex , char *value, char *ifEqualValue );
C# Language
void vts.update_message_ifequals ( string columnName, int rowIndex , string value, string ifEqualValue );
Java Language
intLrvtc.update_message_ifequals ( string columnName, int rowIndex , string value, string ifEqualValue );
| Data Update Functions |
Arguments
| Name | Comments |
|---|---|
| columnName | The column to write to. |
| rowIndex | The number of the row. The first row has index 1. |
| value | The value to set the field to. |
| ifEqualValue | The value to compare the current value of the field to. |
lrvtc_update_message_ifequals writes the value to the field specified with the column name and row index if the value of the field when lrvtc_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
| Protocol | Return Value |
|---|---|
| C and Java languages | In version 26.1: 0: If API call was successful but value was not updated. 1: If API call was successful and value was updated. On call failure, one of the Error Codes. In version 26.3: 0: If API call was successful and and value was updated. One of the Error Codes on call failure, or if the value was not updated. |
C# Language | No return value. |
Parameterization
All string input arguments can be passed using standard parameterization.C Language Example
int rc;
....
rc = lrvtc_update_message_ifequals("P_status", 18, "out of stock","instock");
lr_log_message("update_message rc=%d\n", rc);C# Language Example
.NET Single Connection Example
Java Language Example

