Logo Search packages:      
Sourcecode: freetds version File versions

void tds_set_column_type ( TDSCOLINFO curcol,
int  type 
)

Set type of column initializing all dependency

Parameters:
curcol column to set
type type to set

Definition at line 1136 of file token.c.

References tds_column_info::column_cur_size, tds_column_info::column_size, tds_column_info::column_type, tds_column_info::column_type_save, tds_column_info::column_unicodedata, tds_column_info::column_varint_size, tds_get_size_by_type(), and tds_set_column_type().

Referenced by tds_set_column_type().

{
      /* set type */
      curcol->column_type_save = type;
      curcol->column_type = tds_get_cardinal_type(type);

      /* set size */
      curcol->column_varint_size = tds_get_varint_size(type);
      if (curcol->column_varint_size == 0)
            curcol->column_cur_size = curcol->column_size = tds_get_size_by_type(type);

      /* check for unicode */
      curcol->column_unicodedata = 0;
      if (is_unicode(type))
            curcol->column_unicodedata = 1;
}


Generated by  Doxygen 1.6.0   Back to index