public int listMaxChannel(Database conn) throws SQLException {
  ResultSet rs=null;
  Statement statement=null;
  int maxChannel=-1;
  try {
    statement=conn.createStatement();
    rs=statement.executeQuery(selectMax);
    while (rs.next()) {
      maxChannel=rs.getInt(1);
    }
  }
  finally {
    close(rs);
    close(statement);
  }
  return maxChannel;
}

public int listMaxChannel ( Database conn ) throws SQLException { ResultSet rs = null ; Statement statement = null ; int maxChannel = - 1 ; try { statement = conn . createStatement ( ) ; rs = statement . executeQuery ( selectMax ) ; while ( rs . next ( ) ) { maxChannel = rs . getInt ( 1 ) ; } } finally { close ( rs ) ; close ( statement ) ; } return maxChannel ; }
return the maximum assigned channel .
