Package java.sql

Examples of java.sql.CallableStatement.executeQuery()


            assertEquals(rs.getString(1), "SYSTEM_LOBS");
            assertEquals(rs.getString(2), "LOBS");
            rs.close();
        }

        rs = cs.executeQuery();

        rs.next();
        assertEquals(rs.getString(1), "SYSTEM_LOBS");
        assertEquals(rs.getString(2), "LOB_IDS");
        rs.close();
View Full Code Here


                    r.getBytes(2));

            System.out.println(temp);
        }

        r = s.executeQuery();

        s = c.prepareCall("CALL TEST_CUSTOM_RESULT(6, 1900)");

        try {
            s.execute();
View Full Code Here

      return (melodies);
    }

    try {
      statement = connection.prepareCall("{ call get_all_melodies() }", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
      result = statement.executeQuery();

      while (result.next() != false) {
        Melody melody = new Melody();
        melody.setId(result.getLong("system_id"));
        String sequence = result.getString("sequence");
View Full Code Here

        System.out.println("Standard parsing/execution: " + elapsedTime
            + " ms");

        storedProc = this.conn.prepareCall("{call testSpParse(?)}");
        storedProc.setString(1, "abc");
        this.rs = storedProc.executeQuery();

        assertTrue(this.rs.next());
        assertTrue(this.rs.getInt(1) == 1);

        Properties props = new Properties();
View Full Code Here

        System.out
            .println("Cached parse stage: " + elapsedTime + " ms");

        storedProc = cachedSpConn.prepareCall("{call testSpParse(?)}");
        storedProc.setString(1, "abc");
        this.rs = storedProc.executeQuery();

        assertTrue(this.rs.next());
        assertTrue(this.rs.getInt(1) == 1);

      } finally {
View Full Code Here

         try
         {
            CallableStatement ps = con.prepareCall(query);
            try
            {
               ResultSet rs = ps.executeQuery();
               while( rs.next() )
               {
                  value = rs.getString(1);
               }
               rs.close();
View Full Code Here

    ResultSet rs = null;

    try
    {
      stmt = c.prepareCall("{ call sp_helpuser }");
      rs = stmt.executeQuery();
      while (rs.next())
      {
        String userName = rs.getString(1);
        String loginName = rs.getString(3);
View Full Code Here

        buf.append("'\nGO\n\n");

        /* add users to the role. */
        userStmt = c.prepareCall("{ call sp_helprolemember ? }");
        userStmt.setString(1, roleName);
        userRs = userStmt.executeQuery();

        while (userRs.next())
        {
          String userInRole = userRs.getString(2);
          buf.append("exec sp_addrolemember N'");
View Full Code Here

    {
      stmt = c.prepareCall("{ call sp_helpconstraint ?, ? }");
      stmt.setString(1, oi.getSimpleName());
      stmt.setString(2, "nomsg");

      rs = stmt.executeQuery();

      while (rs.next())
      {
        String constraintType = rs.getString(1);
        String constraintName = rs.getString(2);
View Full Code Here

    try
    {
      stmt = c.prepareCall("{ call sp_helptext (?) }");
      stmt.setString(1, objectName);
      helpText = stmt.executeQuery();
      while (helpText.next())
      {
        buf.append(helpText.getString(1));
      }
    }
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.