Skip to content

SQLServerResultSetMetaData performs checkClosed and that's causing issues #678

Closed
@phaninra

Description

@phaninra

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in the driver. A high priority item that one can expect to be addressed quickly.Work in ProgressThe pull request is a work in progress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions