Bookmark Topic Watch Topic
  • New Topic

Problem with JDBC setResult on JTextarea  RSS feed

 
Behrouz Hosseini
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi guys,
I am trying to display a simple sql query result on a JTextArea.When I use a simple print line command I can get all data in console but when I replace the print command with append() I get these address instead of my data
com.mysql.jdbc.JDBC4ResultSet@1a16869
com.mysql.jdbc.JDBC4ResultSet@1a16869
com.mysql.jdbc.JDBC4ResultSet@1a16869
com.mysql.jdbc.JDBC4ResultSet@1a16869
com.mysql.jdbc.JDBC4ResultSet@1a16869



Could you please let me know what's wrong?
Best Regards
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Report post to moderator
Salam Behrouz,

shouldn't you append resultset.next() instead of resultset?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65970
140
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!