Skip to Content.
Sympa Menu

freetds - Re: Warning: Sybase: column [X] has unknown data type (104)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: "TDS Development Group" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Warning: Sybase: column [X] has unknown data type (104)
  • Date: Wed, 6 Nov 2002 09:52:19 -0500


On Tue, 5 Nov 2002 18:05:25 -0500, "David Clark" <dclark AT rastardm.com>
wrote:
> We currently run FreeTDS 0.60 through PHP4.2.3 on Linux (Mandrake 8.1,
> kernel 2.4.3) to connect to a SQLServer 2000 database running on Win2K.
> When we made the upgrade to 0.60 (from 0.53) we noticed that some of our
> queries started generating warning messages like "Warning: Sybase:
> column 1 has unknown data type (104)".

Right. 104 is a nullable bit column. 0.53 didn't support that (or
converted it to something else, don't remember), and the type doesn't
exist in 4.2. The 0.60 release contained a bug in dbcoltype() that
returned the wrong value. Frediano fixed it on 13 September.

Unless you have/want null values in that column, I recommend "alter table
T alter column C bit not null" and problem solved.

Or you could use any recent snapshot.

Or you could apply the attatched patch.

Regards,

--jkl

Index: dblib.c
===================================================================
RCS file: /cvsroot/freetds/freetds/src/dblib/dblib.c,v
retrieving revision 1.51
retrieving revision 1.55
diff -u -r1.51 -r1.55
--- dblib.c 6 Sep 2002 19:57:05 -0000 1.51
+++ dblib.c 13 Sep 2002 12:03:11 -0000 1.55
@@ -1395,7 +1405,9 @@
else if (colinfo->column_size==2)
return SYBINT2;
else if (colinfo->column_size==1)
- return SYBINT1;
+ return SYBINT1;
+ case SYBBITN:
+ return SYBBIT;
default:
return colinfo->column_type;
}
[end patch]






Archive powered by MHonArc 2.6.24.

Top of Page