title: What causes this "invalid cursor state" error?
body: <p>An "invalid cursor state" error appears when I run this code.</p>
  
  <p>I use this code to obtain the result set from an Access database, and then store it in a table.</p>
  
  <p>This segment of code is only to obtain the data from the result set:</p>
  
  <pre><code>data=new Object[numberOfRows][numberOfColumns];
  for(int i=0;i&lt;numberOfRows;i++){
    int j=0;
    while(j&lt;numberOfColumns){
      // int colType=rsmd.getColumnType(j+1); 
      // System.out.println(colType);
      data[i][j]=rs.getInt("course_id");
      System.out.print("0th: "+data[i][j]+"    ");
      j++;
      data[i][j]=rs.getString("course_name");
      System.out.print("1st:"+data[i][j]+"    ");
      j++;
      data[i][j]=rs.getString("course_date");
      System.out.print("2nd:"+data[i][j]+"    ");
      j++;
      data[i][j]=rs.getString("course_number");
      System.out.print("3rd: "+data[i][j]+"    ");
      j++;
      System.out.print("j:"+j);
    }
    System.out.print("Done line:"+i);
  }
  </code></pre>