• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ResultSet Exhausted Error

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following java class which is called from a servlet ...Whenever I try to retrieve the data using getString()method I get a resultset exhausted message...But when I replaced withit worked...I am totally confused...I am giving both the sevlet code and java class code here....

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the JDBC forum.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are saying the issue is solved, just by replacing s1 with "700x900", the issue can't be with your code.
It could either be a data issue or that s1 does not have the correct value during execution. Better check your data.

Since you are already printing s1 before execution, I can only guess that there may be an extra space in the end.
 
Sandeep Sanaboyina
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, is the below code supposed to be inside the while loop



If it is in the while loop, I don't think the s1 will have proper values everytime.
 
sovan chatt
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Also, is the below code supposed to be inside the while loop

If it is in the while loop, I don't think the s1 will have proper values everytime.


@Sandeep Sanaboyina Why do you think if s is inside while loop s1 wont get proper values...?And there is no extra space in values of s1...please reply..
reply
    Bookmark Topic Watch Topic
  • New Topic