File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Problem with JDBC setResult on JTextarea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

Problem with JDBC setResult on JTextarea

Behrouz Hosseini
Ranch Hand

Joined: Feb 15, 2010
Posts: 31
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

Joined: Aug 21, 2004
Posts: 1855
Salam Behrouz,

shouldn't you append resultset.next() instead of resultset?


SCJP, SCJD, SCWCD, SCBCD
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JDBC setResult on JTextarea