[freetds] XML type returns SQL_CHAR type

Sebastien FLAESCH sf at 4js.com
Sun Jun 21 04:21:53 EDT 2015


On 06/20/2015 12:30 PM, Frediano Ziglio wrote:
> Il 19/Giu/2015 11:53, "Sebastien FLAESCH" <sf at 4js.com> ha scritto:
>>
>> Seems that when using the XML type, SQLDescribeCol() returns SQL_CHAR, and
>> precision=2147483647 ... expected?
>>
>> BTW what are [N]VARCHAR(MAX) types supposed to return in SQLDescribeCol()?
>>
>> Seb
>>
>
> don't remember. Should be part of describecol test.
>
> Frediano
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>

From:

https://technet.microsoft.com/en-us/library/ms130896%28v=sql.110%29.aspx

(very end of page)

SQL Server Native Client ODBC Driver

The SQL Server Native Client ODBC driver exposes the varchar(max), varbinary(max)
and nvarchar(max) types as SQL_VARCHAR, SQL_VARBINARY, and SQL_WVARCHAR in ODBC
API functions that accept or return ODBC SQL data types.

When reporting the maximum size of a column, the driver will report either:
- The defined maximum size, which for example, is 2000 for a varchar(2000) column,
  or
- The value "unlimited" which in the case of a varchar(max) column equals 0.

...


More information about the FreeTDS mailing list