• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Thanks,
-GL
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Dave
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to JDBC, as requested
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which line of code is throwing the exception?
Jamie
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic