Jtds Incorrectly Reports Data Type Info In Result Set Metadata (for Date Columns, Reports Nvarchar)
Currently, the jTDS JDBC driver (1.2.5) against Microsoft SQL Server 2008 appears to incorrectly report the data type for DATE columns as NVARCHAR. It probably behaves the same f
Solution 1:
I found a solution with the condition
metaData.getColumnType(columnNumber) == 12
if this condition is satisfied, execute the query
SELECT System_Type_Id FROM Sys.Columns WHERE Name = [column name] AND Object_Id = (SELECT Object_Id FROM Sys.Tables WHERE Name = [table name])
for smalldatetime it will return 58
and for datetime it will return 61.
Post a Comment for "Jtds Incorrectly Reports Data Type Info In Result Set Metadata (for Date Columns, Reports Nvarchar)"