Skip to Content.
Sympa Menu

freetds - Preliminary TDS 8.0 Notes

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Curt Hagenlocher" <curt AT hagenlocher.org>
  • To: <freetds AT franklin.oit.unc.edu>
  • Subject: Preliminary TDS 8.0 Notes
  • Date: Fri, 8 Jun 2001 22:46:49 -0700


Has anyone played with the new SQL Server 2000 datatypes?
Here's what I've found so far. I've taken some liberties
with the naming.

--
New data type: bigint

New type token SYBINT8 (0x7F)
Existing token SYBINTN can be used with a length of 8

This is pretty straightforward, matching the SYBINTx pattern.
--
New data type: uniqueidentifier

New type token SYBUNIQUE (0x24)
variable length (1 byte)
Data is usually 16 bytes long

{33221100-5544-7766-8899-aabbccddeeff} is streamed as
00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff,
which I think matches the in-memory representation of a
Windows UUID on an Intel box.
--
New data type: sql_variant

New type token SYBVARIANT (0x62)
variable length

I haven't quite figured out the rowset header for this one
yet. There are three bytes between the type and the name,
and so far I've always seen 1f 00 00 in those three bytes.

The data format looks like a 4-byte length, followed by a
type byte, followed by the type-specific data. The type
byte is a SYBxxxx type and not a COM variant type.

Char data appears in the sql_variant as data type 0xa7,
followed by what appear to be locale and sort order data.
--

Other than that, I was able to make the JDBC driver work
just fine by setting the TDS version to 8 and replacing
all comparisons of tdsVer to (TDS70) with (TDS70 or TDS80).

--
Curt Hagenlocher
curt AT hagenlocher.org



  • Preliminary TDS 8.0 Notes, Curt Hagenlocher, 06/09/2001

Archive powered by MHonArc 2.6.24.

Top of Page