# classname_indexname_locate

> This function uses the element values of the object referenced by handle to position the tree index internal pointers.

### Prototype

>         MCO_RET	classname_indexname_locate(	/*IN*/ mco_trans_h trans,
>                               /*INOUT*/ mco_cursor_h cursor,
>                               /*IN*/ classname *handle);

### Arguments

trans | A transaction handle that was established by `mco_trans_start()`
cursor | An instance of a mco_cursor_h that was instantiated via `classname_indexname_index_cursor()`
handle | A pointer to a classname handle

### Description

> This function uses the element values of the object referenced by handle to position the tree index internal pointers. Subsequent mco_cursor_next and mco_cursor_prev operations will navigate from this position in the index. This method is only generated for tree index cursors

### Return Codes

MCO_S_OK | The object was referenced successfully
MCO_S_NOTFOUND | Could not position the cursor
MCO_E_VOLUNTARY_NOT_EXIST | indexname is voluntary and has not been created, or was dropped
MCO_ERR_CURSOR |

Related Topics