Theme:
Increase timeout using .NET C#
How to increase the timeout using .NET C#? My stored procedure is taking 30 minutes
Date: Tuesday, May 9, 2023
1 answers |
297 view(s)
by Mauricio Junior
Answers
The first point is:
-
Try to improve your stored procedure to take less time
-
Try to use the code below to increase the timeout.
connection.Open(); var command = connection.CreateCommand(); command.CommandText = "EXEC " + _storedProcedure + " " + _parameters; command.CommandTimeout = 2800;
Use the command.CommandTimeout is better.
Tuesday, May 9, 2023
Mauricio Junior
![Curso de Microsoft Excel](https://ecode10-image.s3.amazonaws.com/anuncios/1a9ca1e0-a296-4002-a4ee-621f2c713d23curso-de-excel_730_90.gif)