Short term solution would be to make a local hack, but I would seriously try to get a newer driver. If you don't find any, seriously comtemplate migrating away from that database.

I guess we currently need JDBC 2.0 for iBATIS. What you see throwing an exception now is probably not the only thing that's going to throw exceptions. So do we want to built this in or not, any thoughts?

Regards,
Sven

M.H. Avegaart (JIRA) wrote:

SqlExecutor calls getMoreResults without checking supportsMultipleResultSets
----------------------------------------------------------------------------

        Key: IBATIS-269
        URL: http://issues.apache.org/jira/browse/IBATIS-269
    Project: iBatis for Java
       Type: Bug
Components: SQL Maps Versions: 2.1.6 Environment: Windows 2000 NL, IBM RAD 6.0.1
   Reporter: M.H. Avegaart


Hi,

I'm using the JdbcOdbcDriver to connect to a really old ODBC driver (Solid 
v2.2). This ODBC driver doesn't support multiple resultsets, so calling 
getMoreResults() in com.ibatis.sqlmap.engine.execution.SqlExecutor will throw a 
SQLException.

Could you check if the connection supports multiple resultsets before calling 
getMoreResults ?

Example:

private boolean getMoreResults(final Statement stmt) throws SQLException {
        if (!stmt.getConnection().getMetaData().supportsMultipleResultSets()) {
                return false;
        }
        return stmt.getMoreResults();
}

Thanks, Condor


Reply via email to