interface definition for CHAR (Oracle)

Author: (yves2m)

Hello, I try to access an existing table with a CHAR type ... table definition :

Name           Data Type                      ----------------   ------------------------------ ID                NUMBER(9,0)               NOT NULL STATUS        VARCHAR2(40 BYTE) CDATE          DATE SUBJECT       VARCHAR2(256 BYTE) MESSAGE      VARCHAR2(2000 BYTE) TO_SERVER   CHAR(1 BYTE)

In Uniface, I've a problem to get a CHAR type. the field TO_SERVER is defined as String, interface C1, (I tried to put a printscreen, but I don't see how to attach/upload a file) accorting to the documentation Oracle Data Packing.

Oracle Data Packing

Table 1. Mappings Between Uniface Packing Codes and Oracle Storage Format

Uniface Packing Codes

Oracle Storage Format







But when I generate the SQL for Oracle, the field is defined as VARCHAR2(1)

CREATE TABLE "MSG"(         "ID"                             NUMBER(9),         "STATUS"                    VARCHAR2(40),         "CDATE"                      DATE,         "SUBJECT"                   VARCHAR2(256),         "MESSAGE"                  VARCHAR2(2000),         "TO_SERVER"              VARCHAR2(1),   CONSTRAINT "MSGP1" PRIMARY KEY("ID"));

And if I try an export from the table, I get this Oracle error

I/O function: O, mode: 0, on file/table: MSG ORACLE Driver Error [-80]: Column has incorrect ORACLE storage format: Table MSG, Column TO_SERVER, expected storage format VARCHAR2, actual storage format is CHAR ORACLE Driver Error [-52]: Open driver request failed. 8074 - Copied from 'UD5:MSG.MODEL' to 'c:\temp\ewa\msg.xml' total records/rows 0.

So, I understand there is an assignment somewhere that force CHAR to VARCHAR2 but I don't find it in the .asn Do you have an idea where is this setting, or how I can overrule this to get a CHA field ?   Thanks in advance and regards   Yves


  1. Hi, maybe you have in [DRIVER_SETTINGS] a Definition like this?  

    map fixed length to variable

    Map all character strings to Varchar2. Do not use Char.

    USYS$ORA_PARAMS = map fixed length to variable



    This option is only supported to facilitate migration. It may be discontinued in future versions of Uniface.




    Author: Lauterbach (
  2. Perhaps you could use the Load Definitions Utility for Oracle on an empty Uniface repository to reverse-engineer the database table into a Uniface model?

    Author: Arjen van Vliet (
  3. Hello, I can see your Oracle DB is in Unicode and the columns are in BYTE... be warned, that CHAR(40 BYTE) is not the same as CHAR(40 CHAR). You can face errors if you try to store some (non-english) characters in those fields (columns). We had to change the fields to use CHAR (not BYTE), since Uniface seems to use characters (not bytes) to store data (even though nor BYTE nor CHAR is mentioned in the create table scripts), which is IMHO better. Because in the field char(40 byte) you can't store 40 characters, you can only store 40 bytes. Kind regards, Zdeněk Socha

    Author: sochaz (
  4. sochaz said  You can face errors if you try to store some (non-english) characters in those fields (columns).

    "non-english" ? "non-american" ! The first character codepages was definded bei americans as ASCII (and EBCDIC) ASCII is a 7 bit Code with 95 printable characters Later there was an extention to 8bit, but unfortunately not by standard but every "nation" does it in its own way. Uniface try to cover more then 96 characters by defining its own metatable. And then there is unicode, a codepage which each codepoint defined by 4 bytes! The first plane, first block contains the ASCII characaters 1:1 To reduce space, there are several compression methods, called UTF-n (UniversalTransferFormat) If one use UTF-8, unicode will be written in 1bytes(8bit) parts, where are some special characters defines escape sequences. When using the good old ASCII (7bit) all characters are copied one by one, so a text with only ASCII will have the exact same length then the unicode one. When you store text coded in unicode, you need 4 times the size then characters in text. When you using UTF-8 you need "something" in between 1 times and 5 times the length. (Where "5 times" will never be reach, as not all planes have characters defined) SCNR Laugh Ingo

    Author: istiller (