Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-269

SqlExecutor calls getMoreResults without checking supportsMultipleResultSets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.6
    • 2.2.0
    • Core
    • None
    • Windows 2000 NL, IBM RAD 6.0.1

    Description

      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

      Attachments

        Activity

          People

            cbegin Clinton Begin
            condor M.H. Avegaart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: