CallableStatements and OUT Parameters <ph></ph> supports OUT parameters and CALL statements that return values, as in the following example. java.sql.CallableStatementand OUT parameters

CallableStatement cs = conn.prepareCall( "? = CALL getDriverType(cast (? as INT))" cs.registerOutParameter(1, Types.INTEGER); cs.setInt(2, 35); cs.executeUpdate(); Using a CALL statement with a procedure that returns a value is only supported with the ? = syntax.

Register the output type of the parameter before executing the call.