• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

JDBC - number of records fetched

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • 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: 39790
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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
  • 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: 39790
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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.
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!