![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a GridView that uses a SqlDataSource.Select command to fill with data. The user can specify a date range for the select statement and when the query returns a very large number of rows, I receive the following error message after about 30 seconds; 'The timeout period elapsed prior to completion of the operation or the server is not responding.' I have tried increasing the Connection Timeout in the Connection String, but that did not make any difference. Again, this works fine if the number of rows is smaller. What do I need to do to correct this? |
#3
| |||
| |||
|
|
I have a GridView that uses a SqlDataSource.Select command to fill with data. The user can specify a date range for the select statement and when the query returns a very large number of rows, I receive the following error message after about 30 seconds; 'The timeout period elapsed prior to completion of the operation or the server is not responding.' I have tried increasing the Connection Timeout in the Connection String, but that did not make any difference. |
#4
| |||
| |||
|
|
There is Connection Timeout and Command Timeout. You should be setting the Command Timeout. Both of these timeouts can be set to 0, which means that they will never timeout. If you are actually setting Command Timeout, are you saying that setting a longer timeout such as 60 seconds still timed out after 30 seconds? Or did it timeout after 60 seconds? RLF "BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message news:C25364FC-BB6C-41C3-8C59-E483DF945142 (AT) microsoft (DOT) com... I have a GridView that uses a SqlDataSource.Select command to fill with data. The user can specify a date range for the select statement and when the query returns a very large number of rows, I receive the following error message after about 30 seconds; 'The timeout period elapsed prior to completion of the operation or the server is not responding.' I have tried increasing the Connection Timeout in the Connection String, but that did not make any difference. Again, this works fine if the number of rows is smaller. What do I need to do to correct this? . |
#5
| |||
| |||
|
|
BrassicaNigra (brassica_nigra (AT) community (DOT) nospam) writes: I have a GridView that uses a SqlDataSource.Select command to fill with data. The user can specify a date range for the select statement and when the query returns a very large number of rows, I receive the following error message after about 30 seconds; 'The timeout period elapsed prior to completion of the operation or the server is not responding.' I have tried increasing the Connection Timeout in the Connection String, but that did not make any difference. No, because this is a command timeout. You need to set the Command Timeout which is a property on the Command object. Maybe it's available on the Connection object too. You should also ask yourself whether it is acceptable for the user to wait this long - and particularly: will he actually want all these rows? -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx . |
#6
| |||
| |||
|
|
Russel, Thanks for your response. Can you tell me how to set the command timeout property for a SqlDataSource.Select command? I have searched and do not find any way to do this. Dale "Russell Fields" wrote: There is Connection Timeout and Command Timeout. You should be setting the Command Timeout. Both of these timeouts can be set to 0, which means that they will never timeout. If you are actually setting Command Timeout, are you saying that setting a longer timeout such as 60 seconds still timed out after 30 seconds? Or did it timeout after 60 seconds? RLF "BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message news:C25364FC-BB6C-41C3-8C59-E483DF945142 (AT) microsoft (DOT) com... I have a GridView that uses a SqlDataSource.Select command to fill with data. The user can specify a date range for the select statement and when the query returns a very large number of rows, I receive the following error message after about 30 seconds; 'The timeout period elapsed prior to completion of the operation or the server is not responding.' I have tried increasing the Connection Timeout in the Connection String, but that did not make any difference. Again, this works fine if the number of rows is smaller. What do I need to do to correct this? . |
#7
| |||
| |||
|
|
Dale, Well, I looked up your problem and found this on Connect: http://connect.microsoft.com/VisualS...dbackID=103947 One man's workaround: http://www.developmentnow.com/blog/S...d+Timeout.aspx Hope that helps you, RLF "BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message news:5B5FE155-9E3E-4287-A003-FD215313A652 (AT) microsoft (DOT) com... Russel, Thanks for your response. Can you tell me how to set the command timeout property for a SqlDataSource.Select command? I have searched and do not find any way to do this. Dale "Russell Fields" wrote: There is Connection Timeout and Command Timeout. You should be setting the Command Timeout. Both of these timeouts can be set to 0, which means that they will never timeout. If you are actually setting Command Timeout, are you saying that setting a longer timeout such as 60 seconds still timed out after 30 seconds? Or did it timeout after 60 seconds? RLF "BrassicaNigra" <brassica_nigra (AT) community (DOT) nospam> wrote in message news:C25364FC-BB6C-41C3-8C59-E483DF945142 (AT) microsoft (DOT) com... I have a GridView that uses a SqlDataSource.Select command to fill with data. The user can specify a date range for the select statement and when the query returns a very large number of rows, I receive the following error message after about 30 seconds; 'The timeout period elapsed prior to completion of the operation or the server is not responding.' I have tried increasing the Connection Timeout in the Connection String, but that did not make any difference. Again, this works fine if the number of rows is smaller. What do I need to do to correct this? . . |
![]() |
| Thread Tools | |
| Display Modes | |
| |