# classname_indexname_pattern_next

> This function initiates the pattern search and, if successful, returns the handle in the obj parameter of the first object that matches the pattern.

### Prototype

>         MCO_RET	classname_indexname_pattern_next(	/*IN*/ mco_trans_h trans,
>                                   /*IN*/ void *buf,
>                                   /*OUT*/ classname *obj);

### Arguments

trans | A transaction handle that was established by `mco_trans_start()`
buf | The buffer of the size indicated by`classname_indexname_pattern_size()`
obj | The object handle of the first object that matches the given pattern(s)

### Description

> This function initiates the pattern search and, if successful, returns the handle in the obj parameter of the first object that matches the pattern

### Return Codes

MCO_S_OK | The cursor was positioned successfully
MCO_ERR_CURSOR | An cursor error occured
MCO_S_CURSOR_END | The last matching value has been reached

Related Topics