You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft SQL Server vNext (CTP2.0) - 14.0.500.272 (X64)
Client operating system
Ubuntu 16.04.2 LTS
Java/JVM version
openjdk version "1.8.0_131"
Problem description
ResultSet.next() method fails with "java.lang.IllegalArgumentException: Invalid SQL Server data type 0" if the previous row contains either VARCHAR or CHAR types.
ResultSet resultSet = stmt.executeQuery("SELECT cast('abc' as sql_variant) UNION ALL SELECT cast(42 as sql_variant)");
while (resultSet.next()) {
resultSet.getObject(1);
}
Driver version or jar name
6.3.0.jre8-preview
SQL Server version
Microsoft SQL Server vNext (CTP2.0) - 14.0.500.272 (X64)
Client operating system
Ubuntu 16.04.2 LTS
Java/JVM version
openjdk version "1.8.0_131"
Problem description
ResultSet.next() method fails with "java.lang.IllegalArgumentException: Invalid SQL Server data type 0" if the previous row contains either VARCHAR or CHAR types.
It starts working if you comment out the following line
https://github.com/Microsoft/mssql-jdbc/blob/ca55cc340969fbf6f1787c69a0cd52d9856a74c4/src/main/java/com/microsoft/sqlserver/jdbc/dtv.java#L4208-L4208
Repro code
The text was updated successfully, but these errors were encountered: