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: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state

    This is a piece of code written in netbeans on jComboBox1ItemStateChanged event:

    try

    {


    rs2 = st.executeQuery("select distinct visitid from skin where Pid=" + jComboBox1.getSelectedItem().toString());
    jComboBox2.removeAllItems();
    while(rs2.next())
    {

    jComboBox2.addItem(rs2.getString(1));
    }


    }
    catch(Exception e)
    {
    System.out.println(e);

    }


    i am getting the above mentioned exception!! Plz heellp..!!


  2. #2
    Junior Member
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state

    does anyone know the solution????

  3. #3
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state

    Post SSCCE
    And is your database properly configured?

Similar Threads

  1. java.sql.SQLException: No data found
    By Virender in forum JDBC & Databases
    Replies: 2
    Last Post: December 7th, 2011, 12:17 PM
  2. Replies: 1
    Last Post: September 9th, 2011, 02:30 PM
  3. Replies: 0
    Last Post: December 18th, 2010, 07:08 AM
  4. Cannot locate sun.jdbc.odbc.jbcOdbc driver
    By birdlover2010 in forum JDBC & Databases
    Replies: 7
    Last Post: November 6th, 2010, 02:57 PM
  5. Replies: 6
    Last Post: August 30th, 2009, 04:31 AM