Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JDBC 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Timeout" Watch "Timeout" New topic


Tmmet Johnson
Ranch Hand

Joined: Nov 03, 2004
Posts: 56
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?

Don't get me started about those stupid light bulbs.
subject: Timeout
Similar Threads
setQuerytimeout in CallableStatement not working. Kindly please help
how to get the next sequence number ..
Why Statemet interface is not Deprecated ?
JDBC to DB2 Mainframe - query timeout