freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Joe" <harfranks AT yahoo.com>
- To: freetds AT franklin.oit.unc.edu
- Subject: column Type return ?
- Date: Fri, 27 Jul 2001 13:08:06 -0400
Does anyone know what type is in
Unexpected column_type 37
Unexpected column_type 38
Unexpected column_type 52
Unexpected column_type 61
I aready have STBVARCHAR and SYBINT4 just like in Unittests
below is the example
does anyone have the Case made up for the rest?
char *value_as_string(
TDSSOCKET *tds,
int col_idx)
{
static char result[256];
const int type = tds->res_info->columns[col_idx]->column_type;
const char *row = tds->res_info->current_row;
const int offset = tds->res_info->columns[col_idx]->column_offset;
const void *value = (row+offset);
switch(type) {
case SYBVARCHAR:
strncpy(result, (char *)value, sizeof(result)-1);
result[sizeof(result)-1] = '\0';
break;
case SYBINT4:
sprintf(result, "%d", *(int *)value);
break;
default:
sprintf(result, "Unexpected column_type %d", type);
break;
}
return result;
}
Harry Franks
-
column Type return ?,
Joe, 07/27/2001
- <Possible follow-up(s)>
- Re: column Type return ?, Brian Bruns, 07/27/2001
- Re: column Type return ?, h franks, 07/27/2001
- Re: column Type return ?, h franks, 07/27/2001
Archive powered by MHonArc 2.6.24.