Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Updated 8-Aug-11 20:42pm
v2
Comments
Herman<T>.Instance 9-Aug-11 5:10am    
please show your code where this error occurs.
What is the sqlconnection timeout setting value?

Hello,
After you finished the design of Dataset.xsd, find in Dataset.Designer.cs the following code:

C#
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this._commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this._commandCollection;
            }
        }


and change it to :

C#
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
 
Share this answer
 
v2
Comments
Member 8104138 12-Jul-12 8:35am    
It runs man!

thanks
transistor.codeproject 26-Sep-18 6:38am    
Worked ,,, thanks
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.
 
Share this answer
 
v2
Comments
CHill60 10-Dec-13 7:37am    
If you have a question of your own then use the "Ask a Question" link - don't post comments or questions as solutions to old questions

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900