Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-271

ResultSet.first() - SQLDataException: Current position is before the first row

    XMLWordPrintable

Details

    Description

      In the 1.4er Version it give a SQLDataException when calling ResultSet.first() to a executeQuery if the database (excepted the table) has no entries.

      The description in the javadocs says:
      Moves the cursor to the first row in this ResultSet object.
      Returns:true if the cursor is on a valid row; false if there are no rows in the result set

      in 1.4.0 beta 1 it returns also true, if no entry available.

      java.sql.SQLDataException: Current position is before the first row
      at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:115)
      at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69)
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.throwError(MariaSelectResultSet.java:467)
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.getValueObject(MariaSelectResultSet.java:454)
      at org.mariadb.jdbc.internall.queryresults.resultset.AbstractSelectResultSet.getLong(AbstractSelectResultSet.java:306)
      at org.mariadb.jdbc.internal.queryresults.resultset.AbstractSelectResultSet.getLong(AbstractSelectResulttSet.java:302)

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            fahrenholz sfahren
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.