• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC - number of records fetched

 
Narasimha Rao B.
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34210
341
Eclipse IDE Java VI Editor
  • 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
Marshal
Posts: 34210
341
Eclipse IDE Java VI Editor
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic