• 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

JDBC - number of records fetched

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, can anyone tell me why is it that I am not able to get all the data from a database table at one shot and then iterate through the data through my code ?

I have to get around data in one columns for 5000 records from the database in US to my application in India and iterate through the records and store the value in a Vector.

If there are some documents already available, please provide reference to that. I am using JDBC 2.0.


Thanks in advance.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Narasimha,
You should be able to do that. I would question why you need all that data because you don't want to transmit data that you are not going to use.

Are you having a specific problem when trying to get the data?
 
Narasimha Rao B.
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I have a specific requirement,
I need all the data, iterate through the values and based on some
particular logic, needs to identify certain values that satisfies certain conditions and use it in the next query thats fired.

If you have some idea of achieving this, request you to let me know.

By default, it gets me only certain set of records and once I finish iteration on this set, it fetched the next set of data.

Thanks & Regards
Narasimha
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Narasimha,
If you can employ any more filtering in the where clause, do that. But it sounds like you already tried.

Another thing to suggest is to do your logic check in a stored procedure. That way all the data doesn't need to be transmitted. If you don't have control over the remote database or the network, there isn't much you can do.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic