#664 Jtds (1.2.5) mis-reports varchar(max) datatype as clob

v1.2
open
Meta data (46)
5
2012-08-16
2012-01-12
Anonymous
No

The jtds 1.2.5 driver reports the following information about a varchar(max) column (compared with inet's and microsoft's drivers):

Driver | Result Set Column Type | Result Type Name | Result Type Class | Metadata Column Type | MetaData 'sql' Column Type

inet | VARCHAR | varchar | java.lang.String | LONGVARCHAR | LONGVARCHAR
ms | LONGVARCHAR | varchar | java.lang.String | LONGVARCHAR | LONGVARCHAR
jdts | CLOB | text | java.sql.Clob | CLOB | LONGVARCHAR

The other drivers are consistent (except that inet retains backwards compatibility with the general result set type). Jtds reports the column as clob and text, except when getting the "SQL_DATA_TYPE" metadata from the database column metadata.

Code for generating the table attached.

Discussion


  • Anonymous
    2012-01-12

    Varchar(max) type information print program

     
    Last edit: Anonymous 2013-11-25

  • Anonymous
    2012-01-12

    This is wrong, because the varchar(max) type is available in selects and where clauses etc, where clobs require special handling...

     
  • momo
    momo
    2012-08-16

    • milestone: v2.x --> v1.2