public static String getMaxRackID(){
        try {
 
            ResultSet rs=DB.myConnection().createStatement().executeQuery("select max(RackID) from rack");
            while(rs.next()){
                maxrackId=Integer.toString(rs.getInt(1)+1);                
            }
 
        } catch (ClassNotFoundException e) {
            JOptionPane.showMessageDialog(null, "Error @ LoadRack class not found exception");
        }catch(SQLException e2){
            JOptionPane.showMessageDialog(null, "Error @ LoadRack SQL exception");
        }
        return maxrackId;
    }