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
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: 60053
    
  65

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]
 
Don't get me started about those stupid light bulbs.
 
subject: Problem with JDBC setResult on JTextarea
 
Similar Threads
Invoking ODBC database source administrator component of windows
getting a table to show after filling it with data
Problem with JDBC setResult on JTextarea
Table problem
mysql problems in netbeans