This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Timeout" Watch "Timeout" New topic
Author

Timeout

Tmmet Johnson
Ranch Hand

Joined: Nov 03, 2004
Posts: 56
Hi,
I used java.sql.Statement's setQueryTimeout() in Oracle,DB2 and Sybase.

The setQueryTimeout() works fine only for stored procedures.But, for executeUpdate(),executeBatch() and executeQuery() works sometimes.But,does not timeout other times.


Could anyone please let me know

1. Why it works for stored procedures?
2. Why setQueryTimeOut() does not work as expected for executeUpdate,executeBatch() and executeQuery() ALWAYS?

Thanks,
 
I agree. Here's the link: http://kickstarter.com/rocket-mass-heater
 
subject: Timeout