更新时间:2023-02-26 16:20:59
应注意 超时
属性 SqlConnection
对象和 超时
属性 SqlCommand
对象是不同的属性。
默认命令超时设置为30秒。设置为60,您的问题将解决:
You should note that Timeout
property for SqlConnection
object and Timeout
property for SqlCommand
object are different properties.
By default command timeout is set to 30 seconds. Set it to 60, and your issue will be solved:
commandObject.Timeout = 60;
但最有可能的是你应该更改你的SQL过程或拆分成某些部分
But most likely that you should change your SQL procedure or split it to some parts