JDBC setQueryTimeout无法正常工作? [英] JDBC setQueryTimeout not working?

查看:618
本文介绍了JDBC setQueryTimeout无法正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JDBC驱动程序查询MSSQL 2008服务器服务器JAVA. 我做这样的事情:

I'm querying MSSQL 2008 server thourgh JAVA, using the JDBC driver. I do something like this:

PreparedStatement stmt = ...;
...
stmt.setQueryTimeout(60);
stmt.executeQuery();

我看到当SQL服务器上有负载时,即使超时已经过去,该语句也不会被取消.

I see that when there's a load on the SQL server, the statement doesn't get cancelled even though the timeout has passed.

有人对此有任何线索吗?

Does anyone have a clue about this?

谢谢.

推荐答案

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆