ctdbGetFieldDataLength
Retrieve the field data actual length
Declaration
VRLEN ctdbGetFieldDataLength(CTHANDLE Handle, NINT FieldNbr)
Description
ctdbGetFieldDataLength() retrieves the actual length of the field data. This is the actual number of bytes being consumed by the data in a single field, in a single record (row) from a table. Use ctdbGetFieldSize() or ctdbGetFieldLength() to retrieve the defined field size from the table definition. Use ctdbGetFieldData() to retrieve the field data.
In V11 and later, a new field callback has been added. An array of function callbacks are available in c-treeDB API for table and field level control. These are extensively used by the FairCom DB SQL types SDK callback implementations. This is required, for example, when working with existing data types that are not compatible with expected SQL types. Several modifications were done to make this more effective across all data types.
When field callbacks are in place to manipulate field type and size, the SQL interface calls the following for LONG VARCHAR fields:
To make these two functions work properly with field callback in place, these changes were made:
Returns
ctdbGetFieldDataLength() returns the number of bytes being consumed by the data in this field.
See also
ctdbGetFieldSize()