• 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

Using populate in CachedRowSet

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In my application, i am reading the data from the database and then displaying it in another JSP.

In program 1, i am calling the executeQuery method, which is getting the connection object and then exectuing the query.


Program 2 shows how the executeQuery method is defined.


Now the problem is, eventhough aoCRS.size() is retuning size as 1, the line loRS.next() is not getting executed and the it is going to the else part.
Could you please help me on this.

[ November 10, 2008: Message edited by: renu richard ]
[ November 10, 2008: Message edited by: renu richard ]
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you check how many rows are there in resultset, also you can refer one example here http://ilovej2ee.blogspot.com/2008/01/using-cachedrowset-in-java.html

Shailesh
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shailesh,
Thanks for that wonderful example.
The problem in my code was that for debugging i have used next method somewhere already in my application. So, when i tried using the next method again it is called again but there are no rows to execute. Thats why it failed.
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
glad to know that you found the problem

Shailesh
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic