Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbSetFieldProperties

Set field properties such as name, type and length.

Declaration

CTDBRET ctdbSetFieldProperties(CTHANDLE Handle, pTEXT FieldName,

CTDBTYPE Type, VRLEN Length)

Description

ctdbSetFieldProperties() sets field properties such as name, type, and length from the table definition. Use ctdbGetFieldProperties() to retrieve the field properties.

  • Handle [in] the Field Handle.
  • FieldName [in] the field name.
  • Type [in] the field type. Available types are listed in the left-hand column ("FairCom DB API Field Type") in Field Types.

Length [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

ctdbSetFieldProperties() returns CTDBRET_OK on success, or a FairCom DB API C API error code on failure.

See also

ctdbAllocTable(), ctdbGetFieldProperties()

TOCIndex