Re: What's new list in FreeTDS 0.91 and 0.92

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
2011/5/11 James K. Lowden <[email protected]>:
> On Mon, 9 May 2011 10:17:16 -0400
> Raymond R Rankins <[email protected]> wrote:
>
>> Exporting of DATE columns seems to work fine, but when importing into
>> a DATE column, I'm getting the "Msg 20049, Level 4 Data conversion
>> resulted in overflow" error.
>
> The upcoming release 0.91 will not support DATE or other types
> introduced in SQL Server 2008.  Support for these data types will take
> some time, probably the rest of this year at least unless someone
> contributes a patch.
>
> Reading DATE "works" because the server converts DATE to varchar
> (20) for clients using anything less than TDS Version 7.3.  A BCP
> upload requires the client to send DATE data in its binary 3-byte
> format (days since 0001-01-01).  Prior to TDS 7.3 no such type was
> defined.  If sent to a server using, say, TDS 7.2, the server would
> probably reject the packet and disconnect the session, even if the
> server supports TDS 7.3 and *could* recognize the datatype.
>
> Give Microsoft credit for backwards compatibility.  At the same time,
> recognize that "protocol versions" are not as flexible as feature
> negotiation.  To support DATE, we have to implement the whole of TDS
> 7.3.  We can't indicate to the server we'd like 7.2 with DATEs.
>
> To support just DATE, we need inter alia:
>
> 1.  convert DATE <-> varchar
> 2.  convert DATE <-> DATETIME
> 3.  convert DATE <-> SMALLDATETIME
> 4.  support e.g. db_bind for DATE
> 5.  add DATE to the conversion unit test
>
> I took an initial step today to support a TDS 7.3 login packet.  Once
> we can log in, the server will start sending and receiving DATE in its
> native form, and the work listed above can commence.  Before the next
> release, all 7.3 datatypes will need to be supported.  Frediano is even
> headed to MARS.  (MARS, though, *is* a negotiable protocol
> feature; you can be a 7.3 client with or without MARS support.)
>

I have a patch for 7.3, not complete obviously (or I would have
committed earlier). I'll commit the "right" part, login is supported.
The convert stuff is quite missing, I changed just some functions to
support dates from 1-1-1 (well... you can actually write and use this
date but I would remember to Microsoft that Gregorian calendar started
some centuries later :) ).

> So many features, so little time.
>

I perfectly agree with you.

James... what about git ??

Frediano
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.