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

resultset question...

 
karan, chopra
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,i have the following problem,wonder if anyone could help me out..
1.)in my servlet i execute a SQL query on one of the tables of my database,the query returns a couple of tables and stores the result in the resultset.then i display the result in my servlet.everything is fine till now..but when my query is run so that it returns some columns from 2 tables of my database then each value of the resultset is displayed 12 times on the servlet,ie,say each row is displayed a couple of times and not a single time which i want(because i am storing the different values of the resultset into different arrays)..why is this so..plz help....
thanks in advance
regards
karan
 
vikinsa
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That should not happen. I think there is a serious trouble with your presentation logic. Check the loops in the program.

Originally posted by karan, chopra:
hi folks,i have the following problem,wonder if anyone could help me out..
1.)in my servlet i execute a SQL query on one of the tables of my database,the query returns a couple of tables and stores the result in the resultset.then i display the result in my servlet.everything is fine till now..but when my query is run so that it returns some columns from 2 tables of my database then each value of the resultset is displayed 12 times on the servlet,ie,say each row is displayed a couple of times and not a single time which i want(because i am storing the different values of the resultset into different arrays)..why is this so..plz help....
thanks in advance
regards
karan


------------------
Vikas Aggarwal
Technology Associate
http://www.vikinsa.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic