Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Fixed or Variable Length Records

The c-treeDB .NET API automatically, and transparently, handles the details of fixed and variable length records. A table is set to variable length if it has at least one variable length field. c-treeDB .NET scans the user field definitions until it encounters the first variable length field. If a table contains no variable length fields, the record is set to fixed length.

c-treeDB .NET also automatically calculates the size of the fixed portion of a record by adding the size of the fixed length fields, taking into consideration the field alignment in the record buffer, until the first variable length field is encountered. The variable length fields are listed below, with the matching c-tree Plus data type in parentheses:

FIELD_TYPE.VPSTRING (CT_PSTRING)

FIELD_TYPE.VARBINARY (CT_2STRING)

FIELD_TYPE.LVB (CT_4STRING)

FIELD_TYPE.VARCHAR (CT_STRING)

FIELD_TYPE.LVC (CT_STRING)

Any type of field can be placed anywhere in the record buffer and also be used as an index segment. c-treeDB .NET makes full use of this feature by providing the user with an advanced dynamic record buffer management.

TOCIndex