Jtds (1.2.5) mis-reports varchar(max) datatype as clob
Brought to you by:
ickzon
The jtds 1.2.5 driver reports the following information about a varchar(max) column (compared with inet's and microsoft's drivers):
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.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Varchar(max) type information print program
Last edit: Anonymous 2013-11-25
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
This is wrong, because the varchar(max) type is available in selects and where clauses etc, where clobs require special handling...