Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: While for Databse Proplem

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default While for Databse Proplem

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

    try
    {

    while(rs.next())
    {

    exx = rs.getInt("ID");
    exxx = Integer.toString(exx);

    if( empid.getText().equals(exxx))
    {

    String names = rs.getString("NAME");
    ename.setText(names);


    } break;
    }
    }
    catch (SQLException err)
    {
    JOptionPane.showMessageDialog(null, err.getMessage());

    }
    }


  2. #2
    Member
    Join Date
    Jul 2012
    Posts
    71
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Default Re: While for Databse Proplem

    what's the problem???

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: While for Databse Proplem

    The above code are executed. if i will get 3rd record in a database no proplem. at the time i'll select 1st record does not open why plz help

Similar Threads

  1. database Proplem
    By RSelvan in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 17th, 2012, 07:57 AM
  2. sequnce from databse
    By nrao in forum JDBC & Databases
    Replies: 1
    Last Post: December 6th, 2010, 01:42 PM
  3. Insertion and select in JDBC for two different databse
    By nrao in forum JDBC & Databases
    Replies: 1
    Last Post: November 15th, 2010, 08:14 PM
  4. Insertion and select in JDBC for two different databse
    By nrao in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 15th, 2010, 08:14 PM