Share this page

# lrvtc_ensure_index

Creates an index on a column.

Note: This function is deprecated.

## C Language

    VTCERR2 lrvtc_ensure_index ( char *columnName );

## C# Language

    void vts.ensure_index ( string columnName );

## Java Language

    int Lrvtc.ensure_index ( string columnName );

Global Functions

## Arguments

Name | Comments
--- | ---
columnName | The name of the column to index.

lrvtc_ensure_index creates a column index. 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.

A column is locked while an index is being built on it. Any function calls that change the column are queued until the index build completes.

If the index exists, this function has no effect.

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

Copy code

    VTCERR2 rc = 0;

    rc = lrvtc_create_column("Name");
    if(rc) {lr_error_message("Create column failed.");}

    rc = lrvtc_ensure_index("Name");
    if(rc) {lr_error_message("Index operation failed.");}

## 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-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: