Event Handling Help needed please.

Hi,
I am writing a program to simulate a supermarket checkout. I have done the GUI and now i am trying to do the event handling. I have come up against a problem.
I have a JCombobox called prodList and i have added an string array to it called prods . I have also created 2 more arrays with numbers in them.
I want to write the code for if an item is selected from the combo box that the name from the array is shown in a textfield tf1, and also the price and stock no which correspond to the seclected item (both initialised in the other arrays) are also added to the textfield tf1.
I have started writng the code but i am really stuck. Could someone please help me with this please. The code i have done so far is as follows(just the event handling code shown)
          public void ItemStateChange(ItemEvent ie){
          if(ie.getItemSelected()== prodList)
               changeOutput();
          public void changeOutput()
               if(ItemSelected ==0)
                    tf1.setText("You have selected" +a +b +c);
     }

Do you say this because i missed the d of ItemStateChanged ?
I have amended that but still i am getting the same errors class or enum expected. 4 of them relating to the itemStateChanged method.
i will post my whole code if it helps
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Observer;  //new
import java.util.Observable;//new
import javax.swing.BorderFactory;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
public class MySuperMktPro
     public MySuperMktPro()
          CheckoutView Check1 = new CheckoutView(1,0,0);
          CheckoutView Check2 = new CheckoutView(2,300,0);
          CheckoutView Check3 = new CheckoutView(3,600,0);
          CheckoutView Check4 = new CheckoutView(4,0,350);
          CheckoutView Check5 = new CheckoutView(5,600,350);
          OfficeView off111 = new OfficeView();
    public static void main(String[] args) {
         // TODO, add your application code
         System.out.println("Starting My Supermarket Project...");
         MySuperMktPro startup = new MySuperMktPro();
    class CheckoutView implements ItemListener , ActionListener
    private OfficeView off1;
     private JFrame chk1;
     private Container cont1;
     private Dimension screensize,tempDim;
     private JPanel pan1,pan2,pan3,pan4,pan5;
     private JButton buyBut,prodCode;
     private JButton purchase,cashBack,manual,remove,disCo;
     private JButton but1,but2,finaLi1,but4,but5,but6;
     private JTextArea tArea1,tArea2;
     private JTextField tf1,tf2,tf3,list2;
     private JComboBox prodList;
     private JLabel lab1,lab2,lab3,lab4,lab5,lab6,lab7;
     private int checkoutID; //New private int for all methods of this class
     private int passedX,passedY;
     private String prods[];
     private JButton rb1,rb2,rb3,rb4;
     private double price[];
     private int code[];
     public CheckoutView(int passedInteger,int passedX,int passedY)
          checkoutID = passedInteger; //Store the int passed into the method
        this.passedX = passedX;
        this.passedY = passedY;
          drawCheckoutGui();
     public void drawCheckoutGui()
          prods= new String[20];
          prods[0] = "Beans";
          prods[1] = "Eggs";
          prods[2] = "bread";
          prods[3] = "Jam";
          prods[4] = "Butter";
          prods[5] = "Cream";
          prods[6] = "Sugar";
          prods[7] = "Peas";
          prods[8] = "Milk";
          prods[9] = "Bacon";
          prods[10] = "Spaghetti";
          prods[11] = "Corn Flakes";
          prods[12] = "Carrots";
          prods[13] = "Oranges";
          prods[14] = "Bananas";
          prods[15] = "Snickers";
          prods[16] = "Wine";
          prods[17] = "Beer";
          prods[18] = "Lager";
          prods[19] = "Cheese";
          for(i=0; i<prods.length;i++);
          code = new int [20];
          code[0] = 1;
          code[1] = 2;
          code[2] = 3;
          code[3] = 4;
          code[4] = 5;
          code[5] = 6;
          code[6] = 7;
          code[7] = 8;
          code[8] = 9;
          code[9] = 10;
          code[10] = 11;
          code[11] = 12;
          code[12] = 13;
          code[13] = 14;
          code[14] = 15;
          code[15] = 16;
          code[16] = 17;
          code[17] = 18;
          code[18] = 19;
          code[19] = 20;
          for(b=0; b<code.length; b++);
          price = new double [20];
          price[0] = 0.65;
          price[1] = 0.84;
          price[2] = 0.98;
          price[3] = 0.75;
          price[4] = 0.45;
          price[5] = 0.65;
          price[6] = 1.78;
          price[7] = 1.14;
          price[8] = 0.98;
          price[9] = 0.99;
          price[10] = 0.98;
          price[11] = 0.65;
          price[12] = 1.69;
          price[13] = 2.99;
          price[14] = 0.99;
          price[15] = 2.68;
          price[16] = 0.89;
          price[17] = 5.99;
          price[18] = 1.54;
          price[19] = 2.99;
          for(c=0; c<code.length; c++);
          screensize = Toolkit.getDefaultToolkit().getScreenSize();
          chk1 = new JFrame();
          chk1.setTitle("Checkout #" + checkoutID); //Use the new stored int
          chk1.setSize(300,350);
          chk1.setLocation(passedX,passedY);
          chk1.setLayout(new GridLayout(5,1));
          //chk1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          cont1 = chk1.getContentPane();
          //chk1.setLayout(new BorderLayout());
             pan1 = new JPanel();
             pan2 = new JPanel();
          pan3 = new JPanel();
          pan4 = new JPanel();
          pan5 = new JPanel();
          //panel 1
          pan1.setLayout(new FlowLayout());
          pan1.setBackground(Color.black);          
          prodList = new JComboBox(prods);
          prodList.setMaximumRowCount(2);
          prodList.addItemListener(this);
          but1 = new JButton("Buy");
          but1.addActionListener(this);
          lab1 = new JLabel("Products");
          lab1.setForeground(Color.white);
          lab1.setBorder(BorderFactory.createLineBorder(Color.white));
          pan1.add(lab1);
          pan1.add(prodList);          
          pan1.add(but1);
          //panel 2
          pan2 = new JPanel();
          pan2.setLayout(new BorderLayout());
          pan2.setBackground(Color.black);
          lab3 = new JLabel("                                Enter Product Code");
          lab3.setForeground(Color.white);
          tArea2 = new JTextArea(8,10);
          tArea2.setBorder(BorderFactory.createLineBorder(Color.white));
          lab5 = new JLabel("  Tesco's   ");
          lab5.setForeground(Color.white);
          lab5.setBorder(BorderFactory.createLineBorder(Color.white));
          lab6 = new JLabel("Checkout");
          lab6.setForeground(Color.white);
          lab6.setBorder(BorderFactory.createLineBorder(Color.white));
          lab7 = new JLabel("You  selected                      ");
          lab7.setForeground(Color.cyan);
          //lab7.setBorder(BorderFactory.createLineBorder(Color.white));
          pan2.add(lab7,"North");
          pan2.add(lab6,"East");
          pan2.add(tArea2,"Center");
          pan2.add(lab5,"West");
          pan2.add(lab3,"South");
          //panel 3
          pan3 = new JPanel();
          pan3.setLayout(new FlowLayout());
          pan3.setBackground(Color.black);
          manual = new JButton("Manual");
          manual.addActionListener(this);
          manual.setBorder(BorderFactory.createLineBorder(Color.white));
          remove = new JButton("Remove");
          remove.addActionListener(this);
          remove.setBorder(BorderFactory.createLineBorder(Color.white));
          tf1 = new JTextField(5);
          pan3.add(manual);
          pan3.add(tf1);
          pan3.add(remove);
          //panel 4
          pan4 = new JPanel();
          pan4.setLayout(new FlowLayout());
          pan4.setBackground(Color.black);
          finaLi1 = new JButton("Finalise");
     //     finaLi1.addActionListener(this);
          cashBack = new JButton("Cashback");
          JTextField list2 = new JTextField(5);
          but4 = new JButton(" Sum Total");
          but4.addActionListener(this);
          but4.setBorder(BorderFactory.createLineBorder(Color.white));
          cashBack.setBorder(BorderFactory.createLineBorder(Color.white));
          pan4.add(cashBack);
          pan4.add(list2);
          pan4.add(but4);
          //panel 5
          pan5 = new JPanel();
          pan5.setLayout(new GridLayout(2,3));
          pan5.setBackground(Color.black);
          disCo = new JButton("Discount");
          disCo.addActionListener(this);
          disCo.setBorder(BorderFactory.createLineBorder(Color.black));
          but6 = new JButton("Finalise");
          but6.addActionListener(this);
          but6.setBorder(BorderFactory.createLineBorder(Color.black));
          rb1 = new JButton("Cash");
          rb1.addActionListener(this);
          rb1.setBorder(BorderFactory.createLineBorder(Color.black));
          rb2 = new JButton("Card");
          rb2.addActionListener(this);
          rb2.setBorder(BorderFactory.createLineBorder(Color.black));
          rb3 = new JButton("Cheque");
          rb3.addActionListener(this);
          rb3.setBorder(BorderFactory.createLineBorder(Color.black));
          rb4 = new JButton("Voucher");
          rb4.addActionListener(this);
          rb4.setBorder(BorderFactory.createLineBorder(Color.black));
          pan5.add(disCo);
          pan5.add(but6);
          pan5.add(rb1);
          pan5.add(rb2);
          pan5.add(rb3);
          pan5.add(rb4);
          //add the panels to the container        
          cont1.add(pan1);
          cont1.add(pan4);     
          cont1.add(pan2);
          cont1.add(pan3);          
          cont1.add(pan5);          
          chk1.setContentPane(cont1);
          chk1.setVisible(true);     
class OfficeView
     private OfficeView off111;
     private JFrame offMod1;
     private JPanel pane1;
     private JButton refill;
     private Container cont11;
     private Dimension screensize;
     private JTextField tf11,tf12;
     public OfficeView()
          drawOfficeGUI();
     public void drawOfficeGUI()
          screensize = Toolkit.getDefaultToolkit().getScreenSize();
          offMod1 = new JFrame("Office Control");
          int frameWidth = 300;
          int frameHeight = 250;
          offMod1.setSize(frameWidth,frameHeight);
          offMod1.setLocation(300,350);
          offMod1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          cont11 = offMod1.getContentPane();
          pane1 = new JPanel();
          pane1.setBackground(Color.cyan);
          refill = new JButton("Refill");
          tf11 = new JTextField(25);
          tf12 = new JTextField(25);
          pane1.add(tf11);
          pane1.add(refill);
          pane1.add(tf12);
          cont11.add(pane1);
          offMod1.setContentPane(cont11);
          offMod1.setVisible(true);
          public void ItemStateChanged(ItemEvent ie)
                    if(ie.getItemSelected()== prodList)
                              changeOutput();
          public void changeOutput()
                    if(ItemSelected ==0)
                              tf1.setText("You have selected", +a +b +c);
               }Message was edited by:
fowlergod09

Similar Messages

  • I have an older phone, the Iphone 4.  For some reason, all of my calendar events are gone.  I can't see old, present or future events.  Help me please.  I need this information.

    I have an older phone, the Iphone 4.  For some reason, all of my calendar events are gone.  I can't see old, present or future events.  Help me please.  I need this information.

    Please please help me, if you know how.

  • Help needed please.. how do I remove my credit card from itunes? just discovered over $450 of charges when I looked at my email... Kids had no clue they were using our money and not their gift cards

    Help needed please.... I just discovered over $450 charges to my credit card from Itunes. The kids had no idea they were using our credit card and not their itunes gift cards and 4 year old just clicks on anything! I didnt save my credit card details so am a bit miffed at this... I cant find anywhere in itunes to remove it. Edit.. but not remove. Editing does not remove it.. HELP

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Accepted forms of payment  >  http://support.apple.com/kb/HT5552
    Changing Account Information  >  http://support.apple.com/kb/HT1918

  • Help needed please, with Iphone stuck with apple picture and progress bar after software update attempted

    Help needed please, everytime I try to update the software version on my iphone it comes up with a message saying it could not be completed and is now frozen with the apple picture and progress bar on it. Do I unplug it and hope the macbook pro sees it again, I also stupidly did not back up before starting the download which I realise I will have to go back to the previous back up. This keeps happening, everytime I do this type of update, I'm starting to think I should just give up on updating my software on the Iphone. I thought it was happening because I was using a window based computer to do the updates, this time I used my Macbook Pro. Please somebody help

    ljm17 wrote:
    ...This keeps happening, everytime I do this type of update, I...
    Then you should know what you need to do... If you don't remember...
    See Here  >  http://support.apple.com/kb/HT1808

  • I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    Have you guys been able to activate your iphone yet? I bought an iphone 4s from eBay and it worked fine, but the previous user had left some data on it, so last night I used the "erased all content and settings" to restore it to factory setting so I can start fresh and restore my backup. But now I'm stuck at the activation screen (I get the same "the activation server is temporarily unavailable")  and can't get it to activate, even if I use my old deactivated AT&T sim card (I'm on straighttalk now).
    I might try activating it with an active AT&T sim card from my fiancee's phone when she gets home, so I'll let you know how that works outs.
    If it's true that the server is down; anyone know when it will be back up again? Thanks in advance.
    iPhone 4s iOS 5.1.1 (9B206)
    Carrier AT&T 12.0
    Modem Firmware 2.0.12

  • New Hard drive, can't access certain aspects. Help needed please

    Hi everyone.
    I have an HP Pavilion dv6-6052ea laptop.
    I've been having problems with the hard drive so got a new one installed.
    My main issues are since getting it back, I can't access any of the original HP installations etc (I've downloaded all the drivers I know about through HP).
    The 2 main things I'm missing are 2 things that came with the laptop.
    1: Beats Audio sound system 
    2: Video Graphics: AMD Radeon HD 6490M (1 GB DDR5)
    and I have no idea how to get them back. Can anyone help. Do I need to install specific drivers? I can't find any trace that they exist on my laptop now apart from the stickers on the laptop! Any help is greatly appreciated. 
    I never had any CD back ups for the laptop. I do have the old HP back up etc saved on a USB but I don't know enough about the folders and files to know what I need to look for. (I still have the old hardrive.)
    Again, any help is massively appreciated. Thank you!
    Tony 

    If you used your HP Recovery Media, all factory install drivers and software would have been installed. If you didn't create your HP Recovery Media when you first setup your computer, please contact official HP support in your region / country, via the HP Worldwide Support Portal, to see if HP Recovery Media is available for your computer.
    If a generic Windows 7 installation disc was used, you will need to install all HP specific driver for your computer. Please try IDT High-Definition (HD) Audio Driver, Intel High-Definition (HD) Graphics Driver, and AMD High-Definition Graphics Driver to resolve your missing drivers issues. Windows 7 64-bit driver for your computer can be found on the HP Pavilion dv6-6052ea Entertainment Notebook PC Drivers page.
    If you have any further questions, please don't hesitate to ask.
    Please click the White KUDOS "Thumbs Up" to show your appreciation
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • Event handling help

    1.     getGraphics()
    2.     setCursor(?)
    3.     Use setDefaultCloseOperation(Jframe.CLOSE_ON_EXIT);
    4.     The DemoPanel needs a reference to the frame so the easiest way to accomplish this is to have your DemoPanel constructor take an argument of type JFrame. So when you create the DemoPanel you pass it the JFrame reference as an argument. In the constructor you save the reference as an instance variable.
    5.     On the DemoPanel make sure to provide public boolean isFocusTraversable() {return true;}
    6.     You can get the getClickCount() from the MouseEvent class
    7.     You can get what mouse key is pressed using the MouseEvent class CJ5e 384 (hint: e.getModifiers() & InputEvent.Button#_MARK button 1 is left and button 3 is right)
    8.     ParseInt
    9.     Remember when the frame is resized, moved, or covered paintComponent will be called to repaint the Sqaures.
    10.     I think that action key don?t generate a keyTyped event.
    11.     Use the KeyEvent.getKeyChar() in keyTyped to get the character typed.
    12.     Use an array of Color.red, Color.blue, Color.green to key track and iterate through your colors.
    13.     event.getKeyCode() == KeyEvent.VK_ENTER to determine an Enter key
    14.     Use if (!event.isActionKey()) to determine a non actionkey
    public class Demo extends JFrame
    DemoPanel thePanel;
    public Demo()
    // get screen dimensions
    Toolkit kit = Toolkit.getDefaultToolkit();
    Dimension screenSize = kit.getScreenSize();
    int screenHeight = screenSize.height;
    int screenWidth = screenSize.width;
    // put frame in upper right hand corner
    setSize(screenWidth / 2 , screenHeight / 2);
    setLocation((screenWidth / 2),0);
    setTitle("Event-Handling Demonstration");
    // add panel to frame
    thePanel = new DemoPanel(theFrame);
    Container c = this.getContentPane();
    c.add(thePanel);
    this.addWindowListener(new WindowAdapter()
    public void windowDeiconified(WindowEvent e)
    this.show();
    static public void main(String args[])
    Demo theFrame = new Demo();
    [\code]
    Second, does this sound reasonable?
    Do you see anything wrong in the code?

    Yeah, here's a suggestion - quit cross-posting your
    stupid question all over the place and when everyone
    ignores it for another 6 hours, don't bring it back to
    the top AGAIN.Hey, dear friend, don't you ever REALY need an answer for you question.
    If you don't know answer, better don't post ANY message.
    And one more, stupidity of question is a rather personal thing.

  • HELP NEEDED PLEASE

    Hi everyone
    Programming help needed here. Any advice would be greatly appreciated!!!
    I have been assigned some work for a program called Processing 1.0 availale at http://processing.org/download
    I was give the 9 individual programs I needed to make however they were converted to Java files from .pde files. The program is based on Java but only runs .pde files and NOTHING else!
    I decompiled the files and got the source code, but it is a slight variation of the original someone made in processing, and needs some tidying to get it to run.
    I think the programs are very simple for a programmer, although I AM NOT.
    CODE is BELOW
    // Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov Date: 02/05/2009 13:15:00
    // Home Page: http://members.fortunecity.com/neshkov/dj.html http://www.neshkov.com/dj.html - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name: Assign2_1.java
    import processing.core.PApplet;
    public class Assign2_1 extends PApplet
    public Assign2_1()
    SquareSide = 20;
    Rank = Nums.length;
    Side = SquareSide * Rank;
    Green = color(0, 255, 0);
    Yellow = color(255, 255, 0);
    BG = Yellow;
    public void setup()
    size(Side, Side);
    background(BG);
    fill(Green);
    for(int i = 0; i < Rank; i++)
    rect(i * SquareSide, 0.0F, SquareSide, SquareSide * Nums);
    public static void main(String args[])
    PApplet.main(new String[] {
    "--bgcolor=#ece9d8", "Assign2_1"
    int Nums[] = {
    6, 14, 8, 9, 2, 3, 4, 2, 8, 3,
    9, 2, 0, 5
    int SquareSide;
    int Rank;
    int Side;
    int Green;
    int Yellow;
    int BG;
    Edited by: chevy1 on May 2, 2009 7:32 AM

    HELP NEEDED PLEASEShouting is a good way ensure you don't get help. Also you should give a meaningful subject.
    Any advice would be greatly appreciated!!!I suggest you ask a question after providing enough information to be able to answer it.
    Also use CODE tags when posting code as it make the code more readable.
    We are more likely to help people who are trying to learn Java rather than someone who might be looking for an easy way out of doing an assignment.

  • ITunes corrupt file message - urgent help needed please

    I have an iPod video 30GB, i downloded the latest iTunes & Quicktime version, and updated my iPod also to the latest update. When i connect my iPod and start downloading music from the library in iTunes, the iPod keeps on disconnecting and restarting by itself, and i get a message that the file iTunes.exe is corrupt. I tried Apple support and did all what they said by downloading the latest updates and versions, and also did the Chkdsk utility on Windows, but still it did not work, the iPod keep on restarting and i cannot download anything on it, i had it now for a week and did not use it at all because of this problem, can somebody with a technical background help me please, i use Windows XP.

    I have an iPod video 30GB, i downloded the latest iTunes & Quicktime version, and updated my iPod also to the latest update. When i connect my iPod and start downloading music from the library in iTunes, the iPod keeps on disconnecting and restarting by itself, and i get a message that the file iTunes.exe is corrupt. I tried Apple support and did all what they said by downloading the latest updates and versions, and also did the Chkdsk utility on Windows, but still it did not work, the iPod keep on restarting and i cannot download anything on it, i had it now for a week and did not use it at all because of this problem, can somebody with a technical background help me please, i use Windows XP.

  • MP3 burning help needed please

    Hi,
    I'm hoping someone can help me please.
    I'm wanting to burn a mp3 cd but with the songs in separate folders so that when i play them in my car i can flick between the albums instead of having to go through all the singles one after another.
    Does anyone know of a good mp3 burner that can do this, and where to get it from too.
    All and any help in this matter is greatly appreciated
    Cheers
    Paul

    You want them in separate Album folders?
    Put the songs into the playlist.
    Sort the playlist by Album then burn it as MP3* disc.
    This will put the songs into Album folders.
    Likewise, if you sort by Artist, songs will be put into Artist/Album/ folders.
    * Note that only MP3 files will be burned to the disc. If the files are not already MP3 format, they will be skipped.
    If you burn it as a DataCD, it wil work the same except it will copy the files regardless of format. I do this as my CD player will work with both AAC & MP3 formats.

  • WLC Logs!!! Quick Help needed please!

    Hello,
       My client want to check who owned a certain IP address on the WLC and from which AP he was associated. I looked at the system logs in the GUI but couldn't get beyond 6 hours. Is there a place I can download last day logs from CLI/GUI? Or Can I login via SSH and extract the logs via CLI?
    Please this is vital and I appreciate your help,
    Regards,

    Please note that the customer is using Pass-Through Web Authentication for the Guest WLAN.
    Thanks,

  • Delete events in iTunes - help needed please

    Hi.
    I have an iPhone and an iMac .
    I'm synchronies my iPhone with my iMac's Itunes and iPhoto .
    it seems that I have some events in my IMac's iTunes that doesn't appear in my iMac's iPhoto events - these are NOT marked in the pic att .
    How can I delete these  duplicate pictures and events that appear in the (unwanted) unmarked events in the right picture side ?
    Thanks

    You don't need to deauthorize your phone. When you plug it into iTunes on your new computer you should see this warning:
    Before you erase and sync, make sure that you have at least one contact and calendar entry in your computer, then when you sync for the first time you should get an option to merge that data.
    Read more here: http://support.apple.com/kb/HT1296

  • Event Handling Question! Please help me!

    can a JTextField component generate a KeyEvent? Is it possible for the class used to create JTextField object implements KeyListener and fufilled a keyTyped or a keyPressed method created by a keyListener interface

    The best way to find answers to questions like these is to search the API. Near the top of this page is a drop down for APIs, or go here for 1.5 API http://java.sun.com/j2se/1.5.0/docs/api/
    In the API frame look for JTextField and see if it implements a method, or inherits a method that will add a KeyListener. If it does, then the answer to your question is yes.
    Depending on what you want to do, it might be better to use a custom Document instead of a KeyListener.

  • Error in database reading ! help needed please.

    My project involves monitoring of ovens.
    The temperature from the oven are obtained using advantech ADAM module.
    Each material enters the oven and an alert is given to take it out after the desired time inside the oven.
    When i execute this program. an error pops up exactly 1 our after the start of the program.
    Kindly help me.
    I have attached the source code including the DB files and the error screen shot.
    username: 123456
    pass: 123456
    Thank you ina advance.
    Please help figure out the error.
    Regards
    Grugh Mike
    Success is Everything !!
    Solved!
    Go to Solution.
    Attachments:
    New Microsoft Word Document (2).doc ‏151 KB
    source.zip ‏4529 KB

    The biggest problem in your code is architectural. You need to learn about a few things like event-driven programming. As but one example you have an administrative operations VI that would be much smaller and much more efficient if it were built around an event structure and not multiple case statements. Your main application uses sequence structures - which are never necessary. As I recall, the last sequence structure I used in deliverable code was in the spring of '88.
    You also are not handling any of errors - which I suspect might be the source of your problem. It's possible that due to an error (which is going unreported) that a connection is being left open when you think it is being closed. But at this point that is just a guess.
    Fix the structural problems and you'll then be able to troubleshoot your DB problem. Shoot, in the process of fixing the structural issues, you may fix the DB!
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Multiple problems - help needed please

    I've got so many problems that I've completely confused myself. So, if anyone can help….
    I was previously using a D-Link D-320T DSL modem on BT Broadband in the UK. The modem was set up in bridge mode, and hooked up via ethernet to my Airport Extreme (n). The AEBS would use PPPoE and successfully connected to the internet, as well as handling all my network needs.
    Everything worked and everything was fine, allowing screen sharing and file sharing between my Mac Mini, MacBook and MacBook Pro.
    Earlier this week, the internet connection dropped and I couldn't find the cause. Resetting the router and hooking it up directly to my Mac Mini, I connected to it (192.168.1.1) and had it connect to the internet itself.
    It did so, and distributed IP addresses to the Mac Mini…but after 30 seconds my internet connection dropped, and looking in network preferences, I found that the modem had jumped from a router address of 192.168.1.1, to an 82.xx.xx.xx address, which was clearly the public IP address forwarded by my ISP. So it seemed like it was working in a sort of bridge mode still.
    I reset the router numerous times, tried switching it into full bridge mode etc, but the AEBS was unable to use it to connect via PPPoE as before, because the D-Link would play nice for 30 seconds, then jump around with addresses.
    Very strange, but I assumed the modem was just broken.
    I dug out my spare router, being the Netgear DG632.
    I managed to get this hooked up to the internet really quickly, and using an ethernet connection to the Mac Mini, it all appeared fine. However, as I started looking around the internet, I noticed that although google.com would open up, any subsequent links, and indeed any other domains I tried to visit would not open.
    Resetting the router seemed to solve this.
    I then hooked up my AEBS to the Netgear and, after pondering which way to use it, I found the only way I could get it to play nice was to have the AEBS in bridge mode itself, meaning that the Netgear would do all the routing work.
    The MacBook connected to the airport, and all seemed okay….
    …However, I then noticed that the internet connection would randomly drop. Web pages would not open (in any browser), and downloads which were under way could be seen in the Safari download manager to suddenly crash.
    The same was true on the Mac Mini - web browsing stopped at random. I had however hooked this up to the airport via an ethernet cable, I noticed that, although the "internet" wasn't working, other connections like torrents were still active.
    Reconnecting the Netgear router directly to the Mac Mini allowed me to see in its diagnostics that it still held a connection to the ISP and still had an external IP address.
    Again, a reset of the router seemed to resolve things….but only for a few hours. And whilst the Mac Mini seemed resilient, the airport connection to the MacBook was terrible. (I haven't even tried using the MBP yet).
    Furthermore, I noticed that networking between devices had severely been crippled. Although the Mac Mini and MacBook were visible to each other in the shared devices section of finder, clicking the link meant waiting literally four minutes for a connection to establish, and screen sharing timed out, from either direction.
    I then tried assigning everything static IP addresses, but this seemed to confuse matters with the router.
    Under the impression that the Netgear clearly couldn't handle the job of routing my network, I tried to set it up in bridge mode and use the AEBS as before.
    Reading around the internet (on my iPhone at this stage), I realised there was no obvious "bridge mode" option, but I was told to set the device mode as router, and then say "no" when it asks if there are any login details for the ISP (under Basic Router Settings). This was done.
    However, setting up the AEBS with PPPoE had no success, and the connection was never made.
    At this stage, I'm living with a crippled network and two routers, neither of which do what I want.
    Can anybody advise me on a solution to fix either router/modem?
    I want to use the modem in bridge mode and have the AEBS handle everything as before, as it was perfect.
    At this stage, which a frazzled brain (after messing with everything for several hours), something step-by-step would be great.
    Help! (and thanks)

    I have also recently developed problems with my airport network. I was playing my air tunes when it started freezing so i reset my airport extreme and expresses. When I tried to setup my networks again I en counted problems like airport utility couldn't find the extreme base station or when it did it couldn't read the setting. I eventually managed to create a network then when i tried to connect to the network it either asks for the password (even though its saved in keychain) When I enter the password it keeps saying "connection time out". I then turn airpot off & on and it the sometimes reconnects automatically without requiring a password.
    My internet then will sometime start working again but then drop out completely or take an age to load.
    The network will then sometimes disappear from the network list and I'm unable to see it at all.
    No matter how many time i reset the base station it doesn't make a difference.
    I my broadband modem is also a wireless router and Im experiencing similar problems with that. I took my laptop to work and tried to connect to the network at work and it seems to work ok except it did ask for a password the time out but did it only once.
    I did download a security update recently but im not sure if its that that is causing it
    please help me as well as I'm stuck without my network

Maybe you are looking for