Default Packing Codes and Display Formats per Data Type

If no packing code or field interface code is defined in the Database Interface for a field, Uniface uses a default packing code based on the data type. Some packing codes are also associated with a default display format.

The default packing code and associated layout may not be the most appropriate, so we recommend that you specify a packing code in the Database Interface, and if necessary, a display format in the Field Layout property.

The table shows the default packing codes that Uniface presents to the DBMS connectors when no packing code is specified. This does not mean that the defaults are passed on unchanged by the DBMS connectors. The DBMS connector determines the optimum storage format for that combination of data type and packing code.

Default Packing Code and Display Format per Data Type
Uniface Data Type Data Type Code Default Packing Code Default Display Format
Boolean B B DIS(T|F)
Date D D DIS(ddmmyyyy)
Datetime E E DIS(dd-MMM-yyyy hhnnss)
Float F F
Image 1 I R
Linear Date LD D DIS(ddmmyyyy)
Linear Datetime LE E DIS(dd-MMM-yyyy hhnnss)
Linear Time LT T DIS(hh:nn:ss)
Numeric N F
Raw 2 R R
String S C40
Time T T DIS(hh:nn:ss)
XML stream XM VC*

Notes:

  1. The Image data type can be used only for images and glyphs.
  2. The Raw data type allows the full Uniface character set. The default character set for all other data types is CP1252 (on Microsoft Windows). This default can be changed by specifying an allowed character set in the syntax model (see $DEF_CHARSET).

Related Topics