Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbSetFieldLength

Set the field length in the table definition.

Declaration

CTDBRET ctdbSetFieldLength(CTHANDLE Handle, VRLEN len)

Description

ctdbSetFieldLength() sets the field length in the table definition. This affects the entire column of the table: it is not manipulating a field from a single record (row) of the table. Use ctdbGetFieldLength() or ctdbGetFieldSize() to retrieve the field length from the table definition. Use ctdbSetFieldProperties() to set the field length, type, and name.

  • Handle [in] the Field Handle.

len [in] the field length. The maximum length of CHAR, VARCHAR, BINARY, and VARBINARY fields (64K bytes max). The maximum length of LVARCHAR, LVARBINARY fields (2GB max, or set to 0 for "2GB"). This parameter is ignored for all other field types (the non-array-like types).

Returns

ctdbSetFieldLength() returns CTDBRET_OK on success, or a c-treeDB API C API error code on failure.

See also

ctdbGetFieldLength(), ctdbSetFieldProperties

TOCIndex