Loading ...
Sorry, an error occurred while loading the content.

Bug in jaybird 2.1.6 for updateable result sets

Expand Messages
  • Steffen Heil
    Hi I am quite sure, I found one (or two) bug(s) in jaybirds updateable result set emulation : ... Statement statement = connection.createStatement(
    Message 1 of 2 , Nov 5, 2010
    • 0 Attachment
      Hi

      I am quite sure, I found one (or two) bug(s) in jaybirds updateable result
      set "emulation":

      ...
      Statement statement = connection.createStatement(
      ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE );
      ResultSet data = statement.executeQuery( "select id, \"SHARED\" from
      some$table" );
      while ( data.next() ) {
      data.updateInt( 2, f(data.getInt( 2 ) ) );
      data.updateRow();
      }
      data.close();
      statement.close();
      ...

      Results in:

      Exception in thread "main" org.firebirdsql.jdbc.FBSQLException: GDS
      Exception. 335544569. Dynamic SQL Error
      SQL error code = -104
      Token unknown - line 4, column 2
      SHARED
      at
      org.firebirdsql.jdbc.FBRowUpdater.executeStatement(FBRowUpdater.java:612)
      at
      org.firebirdsql.jdbc.FBRowUpdater.updateRow(FBRowUpdater.java:416)
      at
      org.firebirdsql.jdbc.AbstractResultSet.updateRow(AbstractResultSet.java:2500
      )
      ...
      at org.firebirdsql.gds.GDSException: Dynamic SQL Error
      SQL error code = -104
      Token unknown - line 4, column 2
      SHARED
      at
      org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJ
      avaGDSImpl.java:2169)
      at
      org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJa
      vaGDSImpl.java:2119)
      at
      org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlPrepare(AbstractJav
      aGDSImpl.java:1529)
      at
      org.firebirdsql.gds.impl.GDSHelper.prepareStatement(GDSHelper.java:189)
      at
      org.firebirdsql.jdbc.FBRowUpdater.executeStatement(FBRowUpdater.java:573)
      at
      org.firebirdsql.jdbc.FBRowUpdater.updateRow(FBRowUpdater.java:416)
      at
      org.firebirdsql.jdbc.AbstractResultSet.updateRow(AbstractResultSet.java:2500
      )
      ...

      I think there is a problem with quoted field names. Moreover I earlier tried
      with "RDB$DB_KEY" instead of "id". Despite it is mentioned in the release
      notes, that never worked, I had to include the primary key.

      Regards,
      Steffen



      [Non-text portions of this message have been removed]
    • Roman Rokytskyy
      Please, create a ticket, I will this on the weekend. ... -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
      Message 2 of 2 , Nov 5, 2010
      • 0 Attachment
        Please, create a ticket, I will this on the weekend.



        "Steffen Heil" <lists@...> schrieb:

        >Hi
        >
        >I am quite sure, I found one (or two) bug(s) in jaybirds updateable
        >result
        >set "emulation":
        >
        >...
        >Statement statement = connection.createStatement(
        >ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE );
        >ResultSet data = statement.executeQuery( "select id, \"SHARED\" from
        >some$table" );
        >while ( data.next() ) {
        > data.updateInt( 2, f(data.getInt( 2 ) ) );
        > data.updateRow();
        >}
        >data.close();
        >statement.close();
        >...
        >
        >Results in:
        >
        >Exception in thread "main" org.firebirdsql.jdbc.FBSQLException: GDS
        >Exception. 335544569. Dynamic SQL Error
        >SQL error code = -104
        >Token unknown - line 4, column 2
        >SHARED
        > at
        >org.firebirdsql.jdbc.FBRowUpdater.executeStatement(FBRowUpdater.java:612)
        > at
        >org.firebirdsql.jdbc.FBRowUpdater.updateRow(FBRowUpdater.java:416)
        > at
        >org.firebirdsql.jdbc.AbstractResultSet.updateRow(AbstractResultSet.java:2500
        >)
        >...
        >at org.firebirdsql.gds.GDSException: Dynamic SQL Error
        >SQL error code = -104
        >Token unknown - line 4, column 2
        >SHARED
        > at
        >org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJ
        >avaGDSImpl.java:2169)
        > at
        >org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJa
        >vaGDSImpl.java:2119)
        > at
        >org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlPrepare(AbstractJav
        >aGDSImpl.java:1529)
        > at
        >org.firebirdsql.gds.impl.GDSHelper.prepareStatement(GDSHelper.java:189)
        > at
        >org.firebirdsql.jdbc.FBRowUpdater.executeStatement(FBRowUpdater.java:573)
        > at
        >org.firebirdsql.jdbc.FBRowUpdater.updateRow(FBRowUpdater.java:416)
        > at
        >org.firebirdsql.jdbc.AbstractResultSet.updateRow(AbstractResultSet.java:2500
        >)
        >...
        >
        >I think there is a problem with quoted field names. Moreover I earlier
        >tried
        >with "RDB$DB_KEY" instead of "id". Despite it is mentioned in the
        >release
        >notes, that never worked, I had to include the primary key.
        >
        >Regards,
        > Steffen
        >
        >
        >
        >[Non-text portions of this message have been removed]
        >
        >
        >
        >------------------------------------
        >
        >Yahoo! Groups Links
        >
        >
        >
        --
        Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
      Your message has been successfully submitted and would be delivered to recipients shortly.