Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Set the field string encoding.

CTDBRET ctdbDECL ctdbSetFieldStringEncoding( CTHANDLE Handle, pTEXT encoding )


  • Handle [IN] - A c-treeDB API associated field handle
  • encoding [IN] - A string describing the encoding used for the field content. c-treeDB API does not enforce any check on the value passed in, however, JTDB, JDBC, ADO.Net providers and SQL expect to be able to identify the encoding therefore you must use values as defined by


Returns the encoding set on the field on success or a c-treeDB API error on failure.

Calling ctdbSetFieldStringEncoding() on a field type that is not a string field fails with error CTDBRET_INVTYPE.