Examples of SQLWarning


Examples of java.sql.SQLWarning

     try {
      //Note, we add database to the url so that we can allow additional
      //url attributes
      Connection conn = DriverManager.getConnection(Attribute.PROTOCOL+database, p);
      // send warnings
      SQLWarning warn = conn.getWarnings();
      if (warn != null)
        sendSQLMessage(writer, warn, SQLWARNING);
      else
        sendOK(writer);
      conn.close();
View Full Code Here

Examples of java.sql.SQLWarning

    // Now that we've processed all SET statements (assuming no
    // severe exceptions), check for warnings and, if we had any,
    // note this in the SQLCARD reply object (but DON'T cause the
    // EXCSQLSET statement to fail).
    if (hadUnrecognizedStmt) {
      SQLWarning warn = new SQLWarning("One or more SET statements " +
        "not recognized.", "01000");
      throw warn;
    } // end if.

    return;
View Full Code Here

Examples of java.sql.SQLWarning

        moreData = false;
        return moreData;
      }
     
      // 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
      // warning should not reach API level.
      if (rs != null && rs.rowUpdated()) {
        SQLWarning w = new SQLWarning("", SQLState.ROW_UPDATED,
            ExceptionSeverity.WARNING_SEVERITY);
        if (sqlw != null) {
          sqlw.setNextWarning(w);
        } else {
          sqlw = w;
        }
      }
      // Delete holes are manifest as a row consisting of a non-null
      // SQLCARD and a null data group. The SQLCARD has a warning
      // SQLSTATE of 02502
      if (rs != null && rs.rowDeleted()) {
        SQLWarning w = new SQLWarning("", SQLState.ROW_DELETED,
            ExceptionSeverity.WARNING_SEVERITY);
        if (sqlw != null) {
          sqlw.setNextWarning(w);
        } else {
          sqlw = w;
View Full Code Here

Examples of java.sql.SQLWarning

              int updateCount, boolean alwaysSend, boolean sendWarn)
    throws DRDAProtocolException, SQLException
  {
    // instead of writing a chain of sql warning, we send the first one, this is
    // jcc/db2 limitation, see beetle 4629
    SQLWarning warning = null;
    SQLWarning reportWarning = null;
    try
    {
      if (stmt != null)
      {
        warning = stmt.getWarnings();
View Full Code Here

Examples of java.sql.SQLWarning

    }
    if ( export ) {

      statement.executeUpdate( sql );
      try {
        SQLWarning warnings = statement.getWarnings();
        if ( warnings != null) {
          sqlExceptionHelper.logAndClearWarnings( connectionHelper.getConnection() );
        }
      }
      catch( SQLException sqle ) {
View Full Code Here

Examples of java.sql.SQLWarning

                {
                    printResults(out);
                }
            }

            SQLWarning warning = conn.getWarnings();
            while (warning != null)
            {
                log(warning + " sql warning", Project.MSG_VERBOSE);
                warning = warning.getNextWarning();
            }
            conn.clearWarnings();
            goodSql++;
        }
        catch (SQLException e)
View Full Code Here

Examples of java.sql.SQLWarning

    */
    private static void showHoldStatus(String tag, Statement s) throws SQLException
    {
        System.out.println(tag + "Statement holdable " +
                holdStatus(s.getResultSetHoldability()));
        SQLWarning w = s.getConnection().getWarnings();
        while (w != null)
        {
            System.out.println(w.getSQLState() + " :" + w.toString());
            w = w.getNextWarning();
        }
        s.getConnection().clearWarnings();
       
    }
View Full Code Here

Examples of java.sql.SQLWarning

    else if (stmt.resultSetConcurrency == JDBC20Translation.CONCUR_READ_ONLY)
      concurrencyOfThisResultSet = JDBC20Translation.CONCUR_READ_ONLY;
    else {
      if (!isForUpdate()) { //language resultset not updatable
        concurrencyOfThisResultSet = JDBC20Translation.CONCUR_READ_ONLY;
        SQLWarning w = StandardException.newWarning(SQLState.QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET);
        addWarning(w);
      } else
          concurrencyOfThisResultSet = JDBC20Translation.CONCUR_UPDATABLE;
    }
View Full Code Here

Examples of java.sql.SQLWarning

         * connection and we won't be able to do the close later
         */
        throw closeOnTransactionError(t);
      }
        
      SQLWarning w = theResults.getWarnings();
      if (w != null) {
        if (topWarning == null)
          topWarning = w;
        else
          topWarning.setNextWarning(w);
View Full Code Here

Examples of java.sql.SQLWarning

    final int statementHoldabilityCheck(int resultSetHoldability)
        throws SQLException
    {
        int holdability = control.checkHoldCursors(resultSetHoldability, true);
        if (holdability != resultSetHoldability) {
            SQLWarning w =
                 EmbedSQLWarning.newEmbedSQLWarning(SQLState.HOLDABLE_RESULT_SET_NOT_AVAILABLE);
           
            addWarning(w);
        }
       
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.