Forums Register Login

Resultset concept

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
What error are you getting?
+Pie Number of slices to send: Send
java.lang.NullPointerException
+Pie Number of slices to send: Send
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.
He does not suffer fools gladly. But this tiny ad does:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 487 times.
Similar Threads
Resultset concept
About ResultSet
Handling huge resultset
running the result from the end
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:22:14.