• Post Reply Bookmark Topic Watch Topic
  • New Topic

jTable AND jdbc errors  RSS feed

 
Chintan A. Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



here i am using 2 jtables and the first one gets populated from the db table but the second one does not. it gives this error : com.microsoft.sqlserver.jdbc.SQLServerException: The result set is closed.

where i am wrong?
 
Chintan A. Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey I got my mistake. In the last fragment i was using while(rs.next()) where it should have been (Ars.next());
after changing that I am getting this error:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And which line does the Exception occur on?
 
Chintan A. Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is outside the program, the error (in one of the imported packages) but when i comment the last (//after) part it works. So definitely something in the last part of the code, I don't understand what though
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We cannot help you if we don't know what is happening.
 
Chintan A. Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok the console output is:


 
Chintan A. Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok sorry even this is solved.

I changed this


to




Sorry. All solved
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!