• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resultset concept

 
bahri sirine
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
There is a question in my mind. Consider the following code sample

ResultSet rs=smt.executeQuery("Select * from students ");

in this case I want to know how to fix the size of the buffer receive in a resultset.
Thanks
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi bahri sirine,

First of all, a warm welcome to CodeRanch!

bahri sirine wrote:in this case I want to know how to fix the size of the buffer receive in a resultset.

What exactly do you mean with "size of the buffer"? Do you mean the fetch size (as in how many rows should the jdbc driver fetch in one go from the database)?

Kind regards,
Roel
 
bahri sirine
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
when we make select * from there is a tcp connexion so it exit a function : java.net.socket skt;
skt.setsendbuffersize(x);

But always there is an error when I execute this so how can I fixed this send buffer size in a program java ??
thanks
 
Dave Tolls
Ranch Hand
Posts: 2112
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error are you getting?
 
bahri sirine
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.NullPointerException
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In such cases it's always useful to provide the involving code snippet and the stack trace itself, because a NullPointerException can occur almost everywhere.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic