Package java.sql

Examples of java.sql.ResultSet.clearWarnings()


        assertTrue(rs.getAsciiStream("Value") == null);
        assertTrue(rs.wasNull());

        assertTrue(rs.getStatement() == stat);
        assertTrue(rs.getWarnings() == null);
        rs.clearWarnings();
        assertTrue(rs.getWarnings() == null);
        assertEquals(ResultSet.FETCH_FORWARD, rs.getFetchDirection());
        assertEquals(ResultSet.CONCUR_UPDATABLE, rs.getConcurrency());
        rs.next();
        stat.execute("DROP TABLE TEST");
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

                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

            // JDBC 4.0 method getHoldabilty to ensure the
            // holdability is reported correctly.
            int orsCount = 0;
            for (Iterator i = openRS.iterator(); i.hasNext();) {
                ResultSet ors = (ResultSet) i.next();
                ors.clearWarnings();
                orsCount++;
            }
            System.out.println("Global transaction open ResultSets " + orsCount);

                  
View Full Code Here

            // is closed.
            int crsCount = 0;
            for (Iterator i = openRS.iterator(); i.hasNext();) {
                ResultSet crs = (ResultSet) i.next();
                try {
                    crs.clearWarnings();
                } catch (SQLException sqle) {
                }
                crsCount++;
            }
            System.out.println("After global transaction closed ResultSets " + crsCount);
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

        assertWarning(warn, CURSOR_OPERATION_CONFLICT);
        assertEquals("Did not expect the resultset to be updated", oldValue, rs.getInt(2));
        assertTrue("Expected rs.rowDeleted() to be false", !rs.rowDeleted());
        assertTrue("Expected rs.rowUpdated() to be false", !rs.rowUpdated());
       
        rs.clearWarnings();
        rs.deleteRow();
        warn = rs.getWarnings();
        assertWarning(warn, CURSOR_OPERATION_CONFLICT);
        rs.relative(0);
        assertTrue("Expected rs.rowUpdated() to be false", !rs.rowUpdated());
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

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.