存储过程“超时过期” Windows窗体上的异常(C#) [英] Stored Procedure "Timeout expired" exception on Windows Forms (C#)

查看:84
本文介绍了存储过程“超时过期” Windows窗体上的异常(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。我已经阅读了一些类似的主题(大多数都在这个论坛上),但没有一个有用。



我有一个在SQL Server上运行良好的存储过程(在0毫秒内)。当我尝试在WindowsForm应用程序(C#)下运行它时会出现问题。



以下代码





代码块

解决方案

我遇到了同样的问题。您需要设置"CommandTimeout"和"CommandTimeout"。打开连接之前的参数。


Hello. I've read some similar topics (most of them on this forum), but none of them helped.

 

I have a stored procedure which runs fine on SQL Server (in 0 ms). The problem occurs when i try to run it under a WindowsForm application (C#).

 

The following code

Code Block

解决方案

I ran into this same problem.  You need to set the "CommandTimeout" parameter before you open the connection.


这篇关于存储过程“超时过期” Windows窗体上的异常(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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