Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timeout period elapsed
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01263797
Message ID:
01263881
Views:
12
you need to set your actual sqlcommand with a timeout, there is a timeout property. You just set your connection timeout.

>I have a stored procedure that returns the data which I show on the grid. It generally takes less then 30 seconds. Now it will take 2 minutes or 3 minutes due to recent changes. The exception is thrown when it takes longer then 30 seconds. This is the message I get
>
>System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
>
>Here is my code. I increased the time also to 9999999 but it does not work for more then 30 seconds. Please help
>
>
>conAuto_rep.ConnectionString = "server=AAA;database=BBB;uid=ACS78HI;pwd=7G$Mnj259!;Connect Timeout=999999999;pooling=true;";
> conAuto_rep.Open();
>
>cmdSelectActions = new SqlCommand( "dbo.usp_ta", conAuto_rep );
>cmdSelectActions.CommandType = CommandType.StoredProcedure;
> cmdSelectActions.Parameters.Add( "@Month", val1 );
> cmdSelectActions.Parameters.Add( "@Case_st", val4 );
> cmdSelectActions.Parameters.Add( "@Case_En", val5 );
> cmdSelectActions.Parameters.Add( "@Flag", fflag);
> cmdSelectActions.Parameters.Add( "@Client", strClient);
>
> dadComments.SelectCommand = cmdSelectActions;
> dstComments = new DataSet();
> dadComments.Fill( dstComments );
Fred Besterwitch, MCP

The harder you work. The luckier you get.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform