usertype values

The usertype field of the CS_DATAFMT structure is a 32-bit integer.

To find the usertype value, the client application executes sp_columns to obtain a description of the REMOTE_DATA_TYPE column from the sp_columns result set. The REMOTE_DATA_TYPE column returns the integer ID of the ODBC (target) datatype.

The usertype value returned by sp_columns uses various fields in the 32-bit integer for flags, precision and scale, or length. The least significant byte of the value specifies to which target datatype to convert the parameter. The client application places the value in the usertype field. If a 0 (zero) value is placed in the usertype field, the default conversion applies.


For more information

For more information about the CS_DATAFMT structure, ct_param Open Client function call, and usertype field, refer to Open Client Client-Library/C Reference Manual. For more information about sp_columns, see sp_columns.