User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v8.0.x:api:ubf:bvsetoccur.3

bvsetoccur

Name

Bvsetoccur — Set occurrences of the view count field

Synopsis

#include <ubf.h>

int Bvsetoccur(char *cstruct, char *view, char *cname, BFLDOCC occ);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

Function is used to set array length in the C_<field> (count field) if configured in view file with flag C. If flag is not used in view (count field not present in view) then function will just return succeed without changing anything.

RETURN VALUE

On success, Bvsetoccur() return zero; on error, -1 is returned, with Berror set to indicate the error.

ERRORS

Note that Bstrerror() returns generic error message plus custom message with debug info from last function call, stored in thread local storage (TLS).

BEINVAL view, cstruct or cname is NULL. view or cname is empty string (first byte 0x00). Or occurrence is out of bounds of the array declaration.

BBADVIEW invalid view name (not found in view file).

BNOCNAME field name (cname) not found in view structure.

EXAMPLE

See atmitest/test040_typedview/vaccutil.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd