【发布时间】:2011-02-11 13:59:15
【问题描述】:
从 vb.net 调用存储过程时,如果连接字符串中未指定超时,是否有默认的 SQL 超时时间?
我不确定连接字符串中是否指定了CommandTimeout,但我正在考虑所有可能性。
如果在 30 秒(或更长时间)抛出后没有结果的示例:
`System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.`
SQL Profiler 说当程序超时时脚本运行并在 30 秒后结束..
脚本在 SQL Server 中自行运行大约 1 分 45 秒而没有错误。
【问题讨论】:
标签: sql vb.net stored-procedures timeout