int rownum = 0; while (rs.next()) { rownum++; String procname = rs.getString(3); String colname = rs.getString(4); short coltype = rs.getShort(5); short datatype = rs.getShort(6); String typename = rs.getString(7); int precision = rs.getInt(8); int length = rs.getInt(9); short scale = rs.getShort(10); short radix = rs.getShort(11); short nullable = rs.getShort(12); String remarks = rs.getString(13); log.info ("row " + (new Integer(rownum)).toString() + "proc " + procname + " field " + colname);      switch (rownum) { case 4: assertTrue("wrong pr name.", procname.equals("TESTPROC1")); assertTrue("wrong f name.", colname.equals("IN1")); assertTrue("wrong c type.", coltype == DatabaseMetaData.procedureColumnIn); assertTrue("wrong d type.", datatype == Types.INTEGER); assertTrue("wrong t name.", typename.equals("INTEGER")); assertTrue("wrong radix.", radix == 10); assertTrue("wrong nullable.", nullable == DatabaseMetaData.procedureNullable); assertTrue("wrong comment.", remarks == null); break; case 5: assertTrue("wrong pr name", procname.equals("TESTPROC1")); assertTrue("wrong f name", colname.equals("IN2")); break; case 1: assertTrue("wrong pr name", procname.equals("TESTPROC1")); assertTrue("wrong f name", colname.equals("OUT1")); assertTrue("wrong c type", coltype == DatabaseMetaData.procedureColumnOut); break; case 2: assertTrue("wrong pr name", procname.equals("TESTPROC1")); assertTrue("wrong f name", colname.equals("OUT2")); break; case 3: assertTrue("wrong pr name", procname.equals("TESTPROC1")); assertTrue("wrong f name", colname.equals("OUT3")); break; case 6: assertTrue("wrong pr name", procname.equals("TESTPROC2")); assertTrue("wrong f name", colname.equals("INP")); break; default: assertTrue("stray field returned from getProcedureColumns.", false); }   } dropProcedure("testproc1"); dropProcedure("testproc2"); if (ex != null) throw ex;
    public void testGetProcedureColumns() throws Exception {        if (log != null) log.info("testGetProcedureColumns");        ResultSet rs = dmd.getProcedureColumns(null, null, "%", "%");        assertTrue("No resultset returned from getProcedureColumns", rs != null);    }