Package java.sql

Examples of java.sql.ResultSet.clearWarnings()


    }
    catch (SQLException e) {
      // Ok
    }
    try {
      rs.clearWarnings();
      fail("Expected SQLException");
    }
    catch (SQLException e) {
      // Ok
    }
View Full Code Here


                SQLWarning w1 = theConnection.getWarnings();
                SQLWarning w2 = st.getWarnings();
                SQLWarning w3 = rs.getWarnings();
                theConnection.clearWarnings();
                st.clearWarnings();
                rs.clearWarnings();
                warns = appendWarnings(w1,w2);
                {if (true) return new ijWarningResult(appendWarnings(warns,w3));}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

      }
     
      // Send ResultSet warnings if there are any
      SQLWarning sqlw = (rs != null)? rs.getWarnings(): null;
      if (rs != null) {
        rs.clearWarnings();
      }

      // for updatable, insensitive result sets we signal the
      // row updated condition to the client via a warning to be
      // popped by client onto its rowUpdated state, i.e. this
View Full Code Here

          assertEquals(res.getString(3), res.getString(colQualifier + partitionedColumnName));
        }
        assertFalse("Last result value was not null", res.wasNull());
        assertNull("No warnings should be found on ResultSet", res
            .getWarnings());
        res.clearWarnings(); // verifying that method is supported

        // System.out.println(res.getString(1) + " " + res.getString(2));
        assertEquals(
            "getInt and getString don't align for the same result value",
            String.valueOf(res.getInt(1)), res.getString(1));
View Full Code Here

          assertEquals(res.getString(3), res.getString(colQualifier + partitionedColumnName));
        }
        assertFalse("Last result value was not null", res.wasNull());
        assertNull("No warnings should be found on ResultSet", res
            .getWarnings());
        res.clearWarnings(); // verifying that method is supported

        // System.out.println(res.getString(1) + " " + res.getString(2));
        assertEquals(
            "getInt and getString don't align for the same result value",
            String.valueOf(res.getInt(1)), res.getString(1));
View Full Code Here

      }
     
      // Send ResultSet warnings if there are any
      SQLWarning sqlw = (rs != null)? rs.getWarnings(): null;
      if (rs != null) {
        rs.clearWarnings();
      }

      // for updatable, insensitive result sets we signal the
      // row updated condition to the client via a warning to be
      // popped by client onto its rowUpdated state, i.e. this
View Full Code Here

            catch (SQLException e) { }
        try { rs.updateInt(1,1); fail("Expected SQLException"); }
            catch (SQLException e) { }
        try { rs.moveToInsertRow(); fail("Expected SQLException"); }
            catch (SQLException e) { }
        try { rs.clearWarnings(); fail("Expected SQLException"); }
            catch (SQLException e) { }
    }

    /*
     * The JDBC spec says when you have duplicate column names,
View Full Code Here

                }

                r.getLong("DAT");
                r.getString(2);
                r.getObject("ID");
                r.clearWarnings();

                try {

                    // this must throw an error
                    r.getTimestamp("Timestamp?");
View Full Code Here

        assertTrue(rs.next());
        SQLWarning w = rs.getWarnings();
        assertDataTruncation(w, -1, true, false, 3, 2);
        w = w.getNextWarning();
        assertNull(w);
        rs.clearWarnings(); // workaround for DERBY-5765

        // Second row should have no warnings
        assertTrue(rs.next());
        assertNull(rs.getWarnings());
View Full Code Here

            w = w.getNextWarning();
            assertDataTruncation(w, -1, true, false, 4, 2);
        }
        w = w.getNextWarning();
        assertNull(w);
        rs.clearWarnings(); // workaround for DERBY-5765

        // No more rows
        assertFalse(rs.next());
        rs.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.