Skip to Content.
Sympa Menu

freetds - Re: [freetds] Cannot Use DBVERSION_72 With DBLIB In 0.91 Release

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Cannot Use DBVERSION_72 With DBLIB In 0.91 Release
  • Date: Mon, 5 Sep 2011 09:17:45 +0200

2011/9/4 James K. Lowden <jklowden AT freetds.org>:
> On Sun, 4 Sep 2011 10:21:57 -0400
> Ken Collins <ken AT metaskills.net> wrote:
>
> Hi Ken,
>
>> Kudos to your hard work. Just observing things from the outside in,
>> FreeTDS is a monument to awesomeness.
>
> On behalf of everyone in AUTHORS, thanks.
>
>> In closing, I am going to put some notes up on my project's README to
>> try and educate people about the old 8.0/9.0 and new 7.1/7.2 and why
>> they need to worry about configuring and both setting things to 7.2.
>
> I (re)discovered myself something I later read about the Unix guys'
> experience with documentation: once they started including man pages
> for the utilities and standard library, they sometimes decided to fix
> behavior instead of documenting it.
>
>> I'll also try educating them that even tho we are using 7.1 does not
>> mean we are not able to correctly work with the SQL Server 2005 data
>> types.
>
> Because my database work uses numbers, not long strings, I didn't
> follow the development of varchar(max) very carefully.  As we speak I'm
> not perfectly sure how SQL Server 2005 sends a varchar(max) column to a
> TDS 7.1 client.  Microsoft's MS-TDS protocol documentation says
> datatype 0xA5, what we call XSYBVARBINARY, represents both VARCHAR(n)
> and VARCHAR(max), and that for the latter the length is described by
> PARTLEN, introduced in 7.2.   Because TDS 7.1 clients don't
> recognize the PARTLEN type, the server has to send VARCHAR(max) columns
> as something else, probably TEXT.  I can't test that right now, but you
> can see for yourself with "bsqldb -v".
>

Yes, varchar(max) is returned as text (with dummy textptr) to client
which connect with protocol up to 7.1.
>From protocol 7.2 varchar(max) is returned with XSYSVARCHAR,
XSYSVARBINARY is used for varbinary(max).
Currently libTDS does not support conversion to single char for
(n)varchar(max), this is the second reason why libTDS downgrade to
protocol 7.1 for dblib/ctlib.

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page