且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

.net StoredProcedure超时

更新时间:2023-02-07 11:38:04

SQLCommand对象应具有commandtimeout属性,您可以将其设置为所需的任何值,或者如果您不希望命令超时,则进行设置到0.(时间单位是秒).

默认值为30.

The SQLCommand object should have a commandtimeout property, you can set this to any value you want, or if you never want the command to timeout then set it to 0. (Time unit is seconds).

The default value is 30.

SqlCommand command = new SqlCommand( "pro_SaleThrough", DbConnection );
command.CommandTimeout = 0;


感谢您的答复!
但仍然会出错!
我不知道该怎么办!:mad:
thank you for your replying!
but still error!
I have no idea how to do!:mad: