Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in retrieving data from mysql database  RSS feed

 
Shashank Anand
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please tell me what is wrong with this code which displays only 'hello world' and nothing else?
I am using netbeans version 6.5 and mysql 5.0
mysql is the default database. If I execute 'select firstname from emp_table' using sql editor, it displays the results correctly.


 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's wrong is that you aren't writing the data from the result set to the response. You are using "System.out.println" to write it to the application server's logs instead.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!