Coercing Character Data Types
SQL_VARYING data types to
SQL_TEXT data types, change the
sqltype field in the
XSQLVAR structure of the parameter or select-list item to the desired SQL macro data type constant. For example, the following statement assumes that
var is a pointer to an
XSQLVAR structure, and that it contains a
SQL_VARYING data type to convert to
var->sqltype = SQL_TEXT;
After coercing a character data type, provide proper storage space for it. The
sqllen, contains information about the size of the uncoerced data.
sqldata field to the address of the data.