[freetds] bcp currently broken for BIT type in TDS 5.0

James K. Lowden jklowden at freetds.org
Thu Dec 14 22:42:19 EST 2006


Thompson, Bill D (London) wrote:
> 1) do bit columns have to be declared contiguously in a table definition
> ?

Not afaik. If so, nowhere documented.  

> The manual says:
> 
> "The status column in the syscolumns system table indicates the unique
> offset position for bit datatype columns"

Yes, but indicate how?  The answer is more mysterious than the question. 
Here is part of a a Ribo log of Sybase's bcp loading my 2-bit table:

LANGUAGE Token (0x21); variable length.
  Length [4]:                   83
  Status [1]:                   UNUSED (0x00)
  Text Length [0]:              [82]
  Text [82]:                    "select sysstat2 from FreeTDS..sysobjects
where id = object_id('FreeTDS..bittypes')"
...
ROWFMT2 Token (0x61);
  Length [4]:                   35
  Number of Columns [2]:        1
  Column 1
    Column Label Length [1]:    8
    Column Label [8]:           "sysstat2"
    Catalog Name Length [1]:    0
    Schema Length [1]:          0
    Table Name Length [1]:      10
    Table Name [10]:            "sysobjects"
    Column Name Length [1]:     8
    Column Name [8]:            "sysstat2"
    Status [4]:                 ROW_UPDATABLE (0x00000010)
    User Type [4]:              0x00000007
    Data Type [1]:              INT4
    Length [0]:                 [4]
    Locale Length [1]:          0

CONTROL Token (0xAE); variable length.
  Length [2]:                   1
  Control Info Length [1]:      0

ROW Token (0xD1); variable length.
  Column 1
    Length [0]:                 [4]
    Row data [4]:               74240 (0x00012200)

I guess asking about sysobject.sysstat2 for the table is reasonable, sort
of.  But what might 0x00012200 mean as answer?  

--jkl



More information about the FreeTDS mailing list