Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

Problem with JDBC setResult on JTextarea

 
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
Pie
Posts: 65105
89
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.
 
    Bookmark Topic Watch Topic
  • New Topic