Closed
Description
Driver version or jar name
6.3.3.jre7-preview
SQL Server version
2016
Client operating system
Windows 7
Java/JVM version
"1.8.0"
Problem description
The following example can be found in the javadocs of java.sql.ResultSetMetaData
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
I've a similar operation which uses org.springframework.jdbc.object.MappingSqlQuery<T>
to execute the query and then gets hold of ResultSetMetaData object.
The call getColumnCount
works fine with jTDS but not with mssql
driver as SQLServerResultSetMetaData
checks whether the connection is closed.
I might be missing something but could not figure it out. Thanks.