SQLServerException return a null SQLState when trying to convert a date to a long datatype #2167
Labels
Enhancement
An enhancement to the driver. Lower priority than bugs.
Projects
Driver version
12.2
SQL Server version
SQL Server 2017 - 14.0.2042.3 (x64)
Client Operating System
Provide the Operating System the client application is running on.
JAVA/JVM version
1.8.0.272
Problem description
When trying to convert a column read from a recordset using getLong() and the column being converted is a string date-representation the following (expected) error message is shown:
The conversion from datetime to BIGINT is unsupported.
However the SQLState is reported as 'null'
Expected behavior
When the exception is thrown the SQLState '22005' was expected.
Actual behavior
SQLState is reported as 'null'
When using the jtds driver the SQLState is reported correctly.
The text was updated successfully, but these errors were encountered: