Previous Topic

Next Topic

Field Options

The c-tree Drivers support field options, including required, hidden, and read-only fields, as well as precision and scale. Each option is implemented with special information in the field name. However, a field name may not include a period ‘.’. Only the Hidden Fields option applies to read-only Drivers.

Required Fields

The c-tree Drivers will not allow a NULL value for a field whose name in the DODA begins with an asterisk, ‘*’, or a field created using the NOT NULL column constraint. Override this feature with the c-tree Driver SDK.

Hidden Fields

The c-tree Drivers will not display a field whose field name given in the DODA begins with an underscore, ‘_’. Hiding fields that are used to form keys is not recommended and may cause problems.

Read-Only Fields

The c-tree Drivers will display but will not allow updates on a field whose field name given in the DODA begins with a right square bracket character, ‘]’.

Read-Only On Update

To allow a field’s value to be set on an insert operation but not on an update, set the field attribute otOTREE_RDONLYONUPDATE by OR-ing this value into the field’s frsv value in the DODA. When set, the c-tree ODBC Drivers enforce read-only access on update operations for the field but allows the field value to be set on insert operations. An SQL command that attempts to update such a field will fail with the error “access denied”. The otOTREE_RDONLYONUPDATE define is included in the c-tree Driver SDK in otcustm.h. The c-tree Driver SDK is required to use this feature.

Precision and Scale

The c-tree Drivers store precision and scale setting specified when creating numeric columns. The information is stored by appending it to the specified field name in the format fieldname, prec, scale where fieldname is the specified field name, and prec and scale are the specified precision and scale, respectively.