This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes java.sql.SQLException... Need help!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java.sql.SQLException... Need help!!!" Watch "java.sql.SQLException... Need help!!!" New topic

java.sql.SQLException... Need help!!!

George Larry
Ranch Hand

Joined: Nov 07, 2001
Posts: 52
I have a page that works just fine... I make numerous calls to the db with no problems... until- I try to run this report.
It looks something like this:

So... I've been able to get this to work (though it's very slow) when I only run it for 1 dept (the first cs), but if I try to run it for everything... it takes 7 forevers, returns some data then dies giving me the following error:
java.sql.SQLException: No more data to read from socket
What does that mean... and/or how can I fix it? Is my code bad (is this bad practice?- I tried combining all the statements, but that required 5 joins- which took even longer)?
I'd appreciate any help.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

I'll probably get someone to move this to JDBC, it isn't a JSP question.
Dies on what line?
My guess is that it is a problem related to opening multiple ResultSets on the same Connection, but we can't be sure unless you're prepared to try it out.
If you have it working on an ugly join, can you optimise the SQL to speed that up? Not my forte, but a DBA should be able to cut the query right back.
Mapraputa Is
Leverager of our synergies

Joined: Aug 26, 2000
Posts: 10065
Moving to JDBC, as requested

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

which line of code is throwing the exception?
I agree. Here's the link:
subject: java.sql.SQLException... Need help!!!
It's not a secret anymore!