[freetds] Server - Problems with TDS 4.2 COLFMT token

Steve Kirkendall skirkendall at dsl-only.net
Thu May 13 20:39:44 EDT 2004

I'm hoping this will be obvious to somebody...

Most of my success in writing a tiny SQL server has come with TDS 5.0.
Now I'm making another attempt at using TDS 4.2, and I'm running into a
problem.  It seems that the client (the FreeTDS ODBC driver on a Windows
machine) is parsing the 0xA1(COLFMT) token incorrectly.  It keeps reading
column info past the end of the token.

Also, the description of the COLFMT token in "tds.html" seems to be
way off.  It shows 0xA1 as containing column names (duplicating the
names sent via 0xA0(COLNAME) tokens) but really it just contains four
NUL bytes, a type byte and optionally a length byte for each column...
assuming the tds_send_colinfo() function in src/server/server.c is

Anyway, I'd appreciate it if somebody could look through the attached
log file from the client, and tell me why it dies on the COLFMT token.
Maybe it has something to do with the tds_free_all_results() call
immediately before it processes the COLFMT token?

Steve Kirkendall    |A:It is confusing, since people don't read that way
kirkenda at cs.pdx.edu |Q:Why is top-posting bad?
                    |A:It is adding comments to the top of a message
                    |Q:What is top-posting?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FreeTDS.log
Type: application/octet-stream
Size: 12760 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040513/71cea7cf/attachment.obj 

More information about the FreeTDS mailing list