Examples of DBCSOfType


Examples of com.uic.ase.proj.xbn.db.DBCSOfType

    @return The number of rows affected by the update.  For example, if 10 rows are deleted, then 10 is returned.  If no rows are deleted, 0 is returned.<P>
   **/
  protected int update(DBCSPlain dbcs_plain, DBCSPrepared dbcs_prepared) throws SQLException  {

    DBCSOfType dbscot = new DBCSOfType("update", dbcs_plain, dbcs_prepared);


    int iStatus = 0;
    try  {
      if(dbscot.isPlain())  {
        dbscot.getDBConnDirect().debug("update:  " + dbscot.getSql());
        iStatus = dbscot.getStatement().executeUpdate(dbcs_plain.getSql());

      else  {
        dbscot.getDBConnDirect().debug("update:  " + ((DBCSPrepared)dbscot.getDBConnStatement()).getSqlAndParams());
        iStatus = dbscot.getPrepared().executeUpdate();
      }
    }  catch(SQLException sqlx)  {
      dbscot.getDBConnDirect().throwSQLX(this.getClass().getName() + ".update:  " + sqlx.toString());
    }

    if(doThrowOnNoRowUpdate()  &&  iStatus == 0)  {
      dbscot.getDBConnDirect().throwSQLX(this.getClass().getName() + ".update:  Zero rows were affected by this update statement, and doThrowOnNoRowUpdate() is true.");
    }

    return iStatus;
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.db.DBCSOfType

  /**
    <P>Executes DML.</P>
   **/
  protected boolean execute(DBCSPlain dbcs_plain, DBCSPrepared dbcs_prepared) throws SQLException  {

    DBCSOfType dbscot = new DBCSOfType("execute", dbcs_plain, dbcs_prepared);


    boolean bStatus = false;
    try  {
      if(dbscot.isPlain())  {
        dbscot.getDBConnDirect().debug("execute:  " + dbscot.getSql());
        bStatus = dbscot.getStatement().execute(dbcs_plain.getSql());

      else  {
        dbscot.getDBConnDirect().debug("execute:  " + ((DBCSPrepared)dbscot.getDBConnStatement()).getSqlAndParams());
        bStatus = dbscot.getPrepared().execute();
      }
    }  catch(SQLException sqlx)  {
      dbscot.getDBConnDirect().throwSQLX(this.getClass().getName() + ".execute:  " + sqlx.toString());
    }

    return bStatus;
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.db.DBCSOfType

    return getResultSet("getResultSet", dbcs_plain, dbcs_prepared);
  }

  protected ResultSet getResultSet(String s_callingFunc, DBCSPlain dbcs_plain, DBCSPrepared dbcs_prepared) throws SQLException  {

    DBCSOfType dbscot = new DBCSOfType(s_callingFunc, dbcs_plain, dbcs_prepared);


    try  {
      if(dbscot.isPlain())  {
        dbscot.getDBConnDirect().debug(s_callingFunc + ":  " + dbscot.getSql());
        return dbscot.getStatement().executeQuery(dbcs_plain.getSql());

      else  {

        dbscot.getDBConnDirect().debug(s_callingFunc + ":  " + ((DBCSPrepared)dbscot.getDBConnStatement()).getSqlAndParams());
        return dbscot.getPrepared().executeQuery();
      }
    }  catch(SQLException sqlx)  {
      dbscot.getDBConnDirect().throwSQLX(s_callingFunc + ":  " + sqlx.toString());
    }

    //Never reached.  Required for compile.
    return null;
  }
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.