freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT umcc.ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: tds_process_col_info() questions
- Date: Wed, 6 Oct 1999 21:50:50 -0400 (EDT)
Actually it fails all the way around...its query dependant.
instead of:
if(curcol->column_type == SYBTEXT) {
tds_get_n(tds,NULL,12);
it should be:
if(curcol->column_type == SYBTEXT) {
curcol->column_size = tds_get_int(tds);
tabnamesize = tds_get_smallint(tds);
tds_get_n(tds,NULL,tabnamesize);
text_size += 6 + tabnamesize;
bytes 4 and 5 are a smallint indicating the size of the next field (which
is the table name). Why its a small int for table name size is puzzling to
me since the limit on table name is much shorter (although the table name
can be fully qualified like: pubs2.dbo.blurbs)
Look at tds_process_result() for TDS 5.0 to see how its done. I'm not
sure why this never got pushed back into tds_process_col_info() (the 4.2
equivalent)
Cheers,
Brian
On Wed, 6 Oct 1999, Mark Schaal wrote:
>
> These questions are about the code for tds_process_col_info().
>
> (1) The SYBTEXT portion drains 12 bytes, but here (SQLServer 6.5) it
> looks like 13 is the correct value. Is 12 right for some other
> platform?
>
> (2) All the tmp_rest stuff is just supposed to drain any remaining
> bytes as indicated by the hdrsize, correct? It looks like old
> code that is no longer correct.
>
> I have a cleaned up version of tds_process_col_info() which I'll
> upload tomorrow if no problems appear.
>
> Mark
> --
> Mark J. Schaal Phone: (909)
> 620-7724
> TST On Ramp Fax: (909) 620-8174
> System Administrator E-Mail: mark AT tstonramp.com
>
-
tds_process_col_info() questions,
Mark Schaal, 10/06/1999
- <Possible follow-up(s)>
- Re: tds_process_col_info() questions, Brian Bruns, 10/06/1999
Archive powered by MHonArc 2.6.24.