DDL info: CHAR(n)
C++ info: UdxBase::UDX_FIXED
struct StringArg
{
char* data;
int length; // Bytes used by string data (not characters).
int dec_length; // Character declared length ie NCHAR(20) = 20. Will
// also be set if VARCHAR or NVARCHAR.
};
struct StringReturn
{
char* data;
int size;
// On enter it is the size (in bytes) allocated for string data.
// On return it is the size (in bytes) actually used.
};
The char type often has implicit spaces at the end when passed as an argument. The difference between the specified length and the dec_length indicates how many trailing spaces must be accounted for. Length is in bytes and dec_length is in characters.