freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] VARCHAR values > 8000 bytes truncated (db-lib)
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] VARCHAR values > 8000 bytes truncated (db-lib)
- Date: Wed, 23 Dec 2015 10:06:10 +0000
Il 11/Dic/2015 13:12, "Joshua Lang" <joshua.h.lang AT gmail.com> ha scritto:
>
> When trying to pass stored procedure VARCHAR(MAX) parameters (using
> SYBVARCHAR for the parameter type), the value is truncated at 8000. This
is
> due to the `tds_fix_column_size` method limiting the value to 8000 because
> the `column_varint_size` of the column == 2.
>
> Based on the comment in `tds_fix_column_size` (src/tds/query.c), it seems
> as if this is unexpected:
>
> /* note that varchar(max)/varbinary(max) have a varint of 8 */
>
> The comment above indicates that this should be supported. Am I missing
> something or using the db-lib API incorrectly? My code is working fine
> otherwise.
>
>
>
>
> freetds: 0.95.73
> OS: Ubuntu 14.04
> DB: MS SQL Server 2008 SP3
> TDS: 7.3
>
> Thanks
>
Hi,
Varchar(max) is more similar to text than to normal varchar so type is
not promoted. I don't remember if text is promoted to varchar(max) under
dblib.
Frediano
-
[freetds] VARCHAR values > 8000 bytes truncated (db-lib),
Joshua Lang, 12/10/2015
- Re: [freetds] VARCHAR values > 8000 bytes truncated (db-lib), Frediano Ziglio, 12/23/2015
Archive powered by MHonArc 2.6.24.