[freetds] row data length

Thompson, Bill D (London) bill_d_thompson at ml.com
Fri Jan 27 05:01:47 EST 2006


Hi James, 

You are correct. the description of the row packet is out of date.

variable length data is preceded by either a one, two or four byte
length field.
We know which it is going to be from the results metadata that precedes
the row data.


Bill 

-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of James Harper
Sent: 26 January 2006 22:38
To: FreeTDS Development Group
Subject: [freetds] row data length


According to http://www.freetds.org/tds.html:

"Row data starts with one byte (decimal 209), for variable length types,
a one byte length field precedes the data, for fixed length records just
the data appears."

This says to me that variable length types (eg varchar) are limited to
255 bytes, which doesn't sound right. I've used varchar fields of up to
a few k before without problems. Maybe the 209 record is only for older
tds protocols, but then I can't see something that supersedes it...

I can look at the source or do packet traces and figure out what's
really going on but if someone here can tell me then it would save me
some time!

Thanks

James
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------



More information about the FreeTDS mailing list