Package java.sql

Examples of java.sql.Connection.prepareCall()


      if (this.conn==null) conn = getConn(); else conn = this.conn;
      AccountingMotiveVO vo = null;
      for(int i=0;i<list.size();i++) {
        // logically delete the record in ACC03...
        vo = (AccountingMotiveVO)list.get(i);
        pstmt = conn.prepareCall("update ACC03_ACCOUNTING_MOTIVES set ENABLED='N',LAST_UPDATE_USER=?,LAST_UPDATE_DATE=?  where ACCOUNTING_MOTIVE_CODE='"+vo.getAccountingMotiveCodeACC03()+"'");
        pstmt.setString(1,username);
        pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
        pstmt.execute();
        pstmt.close();
      }
View Full Code Here


    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;

      // logically delete record in REG04...
     pstmt = conn.prepareCall(
        "update REG04_SUBJECTS set ENABLED='N',LAST_UPDATE_USER=?,LAST_UPDATE_DATE=?  where COMPANY_CODE_SYS01='"+vo.getCompanyCodeSys01REG04()+"' and PROGRESSIVE="+vo.getProgressiveREG04()
      );
      pstmt.setString(1,username);
      pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
      pstmt.execute();
View Full Code Here

      pstmt.setString(1,username);
      pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
      pstmt.execute();
      pstmt.close();

      pstmt = conn.prepareCall(
        "update REG04_SUBJECTS set ENABLED='N',LAST_UPDATE_USER=?,LAST_UPDATE_DATE=?  where COMPANY_CODE_SYS01='"+vo.getCompanyCodeSys01REG04()+"' and PROGRESSIVE_REG04="+vo.getProgressiveREG04()
      );
      pstmt.setString(1,username);
      pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
      pstmt.execute();
View Full Code Here

                for (int opt = 0; opt < jdbcTypes.length; opt++) {
                    int jopt = jdbcTypes[opt];
                    if (jopt == Types.NULL)
                        continue;

                    CallableStatement csp = conn.prepareCall("CALL PMP.TYPE_AS(?, ?, ?)");
                   
                    boolean bothRegistered = true;
                    //System.out.print("INOUT " + sqlType + " registerOutParameter(" + JDBC.sqlNameFromJdbc(jopt) + ") ");
                    try {
                        csp.registerOutParameter(2, jopt);
View Full Code Here

        JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "NOACCESS");
       
        conn1.commit();
       
        // now add/switch some names using the utility method
        CallableStatement csSetAccess = conn1.prepareCall(
            "CALL SYSCS_UTIL.SYSCS_SET_USER_ACCESS(?, ?)");
       
        // Change AMES, everyone else is unchanged
        csSetAccess.setString(1, "AMES");
        csSetAccess.setString(2, "FULLACCESS");
View Full Code Here

        Connection conn1 = openDefaultConnection(
            "dan", ("dan" + PASSWORD_SUFFIX));
       
        PreparedStatement psGetAccess = conn1.prepareStatement(
            "VALUES SYSCS_UTIL.SYSCS_GET_USER_ACCESS(?)");
        CallableStatement csSetAccess = conn1.prepareCall(
            "CALL SYSCS_UTIL.SYSCS_SET_USER_ACCESS(?, ?)");
       
        csSetAccess.setString(1, "DAN");
        csSetAccess.setString(2, "FULLACCESS");
        csSetAccess.execute();
View Full Code Here

        st_samConnection.executeUpdate(
            " insert into samTable values 1,2,3,4,5,6,7");
       
        // Following should pass... PUBLIC should have access to these
       
        cSt = samConnection.prepareCall(
            "call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
        assertUpdateCount(cSt, 0);
       
        cSt = samConnection.prepareCall(
            " call SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(1)");
View Full Code Here

       
        cSt = samConnection.prepareCall(
            "call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
        assertUpdateCount(cSt, 0);
       
        cSt = samConnection.prepareCall(
            " call SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(1)");
        assertUpdateCount(cSt, 0);
       
        rs = st_samConnection.executeQuery(
            " values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()");
View Full Code Here

        expColNames = new String [] {"1"};
        JDBC.assertColumnNames(rs, expColNames);
       
        JDBC.assertDrainResults(rs, 1);

        cSt = samConnection.prepareCall(
            " call SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('SAM','SAMTABLE',null)");
        assertUpdateCount(cSt, 0);
        cSt.close();
       
        cSt = samConnection.prepareCall(
View Full Code Here

        cSt = samConnection.prepareCall(
            " call SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('SAM','SAMTABLE',null)");
        assertUpdateCount(cSt, 0);
        cSt.close();
       
        cSt = samConnection.prepareCall(
            " call SYSCS_UTIL.SYSCS_COMPRESS_TABLE('SAM', 'SAMTABLE', 1)");
        assertUpdateCount(cSt, 0);
        cSt.close();
       
        cSt = samConnection.prepareCall(
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.