Share this page

# lrvtc_send_if_unique

Sets the last field of a column to a value if the value does not exist in the column.

## C Language

    VTCERR2 lrvtc_send_if_unique ( char *columnName, char *value );

## C# Language

    void vts.send_if_unique ( string columnName, string value );

## Java Language

    int Lrvtc.send_if_unique ( string columnName, string value );

Data Update Functions

## Arguments

Name | Comments
--- | ---
columnName | The name of the column.
value | The string to write to the field.

lrvtc_send_if_unique sets the last field of a column to a value if the value does not exist in the column. If the value already exists in the column, the function has no effect.

If a column is not indexed, the time required to execute a lrvtc_send_if_unique call increases with the number of rows. If the column is indexed, the time for 'send if unique' operations is constant. For large databases, we recommend that you index columns you want to perform 'send if unique' operations on. See

## Return Values

C Language: Returns zero on success or one of the Error Codes.

C# Language: No return value.

Java Language: Returns zero on success or one of the Error Codes.

## Parameterization

All string input arguments can be passed using standard parameterization.

## C Language Example

        int rc;
        ...
        rc = lrvtc_send_if_unique("Default_Answer", "42");
        lr_log_message("Send if unique rc=%d\n", rc);

## 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: