Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Query Timeout for Prepared Statement

nitul.kukadiaJan 8 2014 — edited Oct 15 2014

Hi All,

          JDBC API has Query Timeout parameter in PreparedStatement.

         PreparedStatement ps= connection.prepareStatement(QUERY);

         ps.setQueryTimeout(seconds);

         I need to set this parameter every time, when I create prepared statement from connection.

         Is there any way to set this parameter globally, so that eery prepared statement will be created from connection, has already query timeout parameter.

Thanks

This post has been answered by unknown-7404 on Jan 8 2014
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 5 2014
Added on Jan 8 2014
2 comments
2,029 views