Home | Previous Page | Next Page   DataBlade API Overview > Accessing SQL Data Types > Character Data Types >

The mi_char1 and mi_unsigned_char1 Data Types

The mi_char1 and mi_unsigned_char1 data types hold a single-byte character. These data types can also hold an integer quantity within C code so you can also use mi_unsigned_char1 to hold unsigned one-byte integer values.

Important:
To make your DataBlade API module portable, It is recommended that you use the DataBlade API data type mi_char1 for single-character values instead of the native C-language counterpart, char. The mi_char1 data type ensures a consistent size across computer architectures.
Global Language Support

The mi_char1 and mi_unsigned_char1 data types assume that one character uses one byte of storage. Therefore, do not use these data types to hold multibyte characters (which can require up to four bytes of storage). Instead, use the mi_char, mi_string, or mi_lvarchar data type. For more information on multibyte characters, see the IBM Informix: GLS User's Guide.

End of Global Language Support
Server Only

The mi_char1 and mi_unsigned_char1 data types are guaranteed to be one byte on all computer architectures. Therefore, they can fit into an MI_DATUM structure and can be passed by value in C UDRs.

End of Server Only
Client Only

All data types, including mi_char1 and mi_unsigned_char1, must be passed by reference in client LIBMI applications.

End of Client Only
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]