Share this page

# vtc_send_if_unique

Deprecated. Use 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 vtc_send_if_unique ( PVCI2 pvci, char *columnName, char *value, unsigned short *outRc );

## C# Language

    bool vts_multi.send_if_unique ( long pvci, string columnName, string value);

Data Update Functions

## Arguments

Name | Comments
--- | ---
pvci | The server connection handle.
columnName | The name of the column.
value | The string to write to the field.
outRc | The status of the operation: 1 - Pass or 0 - Fail

vtc_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 vtc_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 vtc_ensure_index.

## Return Values

C Language: 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 rc;
    unsigned short status = 0;
    ...

    rc = vtc_send_if_unique(pvci, "H_question", "Question!", &status);
    lr_log_message("send_message rc=%d\n", rc);

## C# Language Example

.Net Multiple Connection Example

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