Dataset.xsd超时问题 [英] Dataset.xsd Timeout Problem
本文介绍了Dataset.xsd超时问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用带有tableadapter的Dataset.xsd,我正在使用MS报告服务进行报告。
但错误正在发生
错误:
报告处理期间发生错误。< br />
*调用目标引发了异常。< br />
*超时已过期。操作完成之前经过的超时时间或服务器没有响应
我该怎么做才能避免这个错误?
解决方案
您好,
完成Dataset.xsd的设计后,在Dataset.Designer.cs中找到以下代码:
受保护 全球 :: System.Data.SqlClient.SqlCommand [] CommandCollection {
get {
if (( this ._ commandCollection == null )){
此跨度> .InitCommandCollection();
}
return this ._ commandCollection;
}
}
并将其更改为:
protected global :: System.Data.SqlClient。 SqlCommand [] CommandCollection
{
get
{
if (( this ._ commandCollection == null ))
{
< span class =code-keyword> this .InitCommandCollection();
_commandCollection [ 0 ]。CommandTimeout = 0 ;
}
_commandCollection [ 0 ]。CommandTimeout = 0 ;
return this ._ commandCollection;
}
}
建立您的计划并享受。
Tudorel Stirbu
Asp.Net Developer
我找不到那个文件(dataset_name.Designer.cs),我只看到dataset_name.xsd和dataset_name.xss
我不使用解决方案或管理我的网站,如项目,我只是打开我的网站,我没有.sln或.prj文件。
I'm using Dataset.xsd with tableadapter and I'm doing a report using MS reporting service.
but the error is occurring
error:
An error has occurred during report processing.<br /> * Exception has been thrown by the target of an invocation.<br /> * Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
What should I do to avoid this error?
解决方案
Hello,
After you finished the design of Dataset.xsd, find in Dataset.Designer.cs the following code:
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } }
and change it to :
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); _commandCollection[0].CommandTimeout = 0; } _commandCollection[0].CommandTimeout = 0; return this._commandCollection; } }
Build your program and enjoy.
Tudorel Stirbu
Asp.Net Developer
I can't find that file (dataset_name.Designer.cs), I just see dataset_name.xsd and dataset_name.xss
I don't use "solutions" or manage my website like "project", I just open my website, I don't hace a .sln or .prj files.
这篇关于Dataset.xsd超时问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文