xcall SQL, SQLOP_SET_COLDEFS, cmdhdr, columninfox
This is the inverse of SQLOP_GET_COLDEFS and is used to modify the column definitions of the latest query. In general this is risky and of questionable value, since it creates a discrepancy between how the database sees the columns of the result set, and how the application does. The one case where it might be useful is, when using ODBC, to reduce the length of a long string field prior to fetching the row as a single string update the column definitions. There is no need to do this when fetching row data field by field, since each field would be truncated to the size of the specified variable. But when fetching the entire row at a time, the space allocated to each field in the row would be determined by the length member of the columninfox structure. All parameters are as described for SQLOP_GET_COLDEFS.