On Mon, Apr 19, 2010 at 11:00:05PM +0200, Frediano Ziglio wrote:
> Il giorno lun, 19/04/2010 alle 12.04 -0400, [email protected] ha
> scritto:
> > > > ?? For db-lib connections, the server converts varchar(max) to TEXT (type 35). Then the db-lib API can deal with it either by binding it as a string or with dbmoretext().
> > >
> > > Yes, this is true with MS dblib cause MS dblib use only protocol 4.2. We
> > > support protocol up to 7.1 under dblib :)
>
> Yes, cause you are using protocol 7.1 which does not support
> varchar(max) so this type is returned as text :)
> Protocol 7.2 support varchar(max) with different byte encoding.
I see, finally. I found this code in tds_connect_and_login():
/* disable tds9 if iconv wanted, currently not supported */
if (IS_TDS72(connection) && tds->use_iconv)
connection->tds_version = 0x701;
So, no matter how I set TDSVER, I never get more than 7.1. :-(
I've come to understand that client encoding is properly a binding step: the library should always keep an original as-received copy of the data, and only when asked to convert to a "string" does it need to consult iconv. That's the only way to support binary bindings, and the best way to support UTF-16 on a TDS 7+ connection.
Not easy to fix, though.
--jkl
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.