Sql Time Out Problem
-
Hi, In my Asp.net WebApplication When Im Running A Select Query Im Getting A Error Like This: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I Tried A lot Of Ways For Solving This Problem..But No One worked. Thanks In Advance, Vishnu
-
Hi, In my Asp.net WebApplication When Im Running A Select Query Im Getting A Error Like This: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I Tried A lot Of Ways For Solving This Problem..But No One worked. Thanks In Advance, Vishnu
vishnukamath wrote:
I Tried A lot Of Ways For Solving This Problem.
Have you tried
cmd.CommandTimeout = 10000;
-
vishnukamath wrote:
I Tried A lot Of Ways For Solving This Problem.
Have you tried
cmd.CommandTimeout = 10000;
thanks for replying Me Sir, Im Using The Select Query to Get the data in to datatable by using dataadapter. when im debugging and when the cursor came to adapter.fill(datatable). it is going into the catch and the error is comming like: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. thanks in advance, vishnu
-
thanks for replying Me Sir, Im Using The Select Query to Get the data in to datatable by using dataadapter. when im debugging and when the cursor came to adapter.fill(datatable). it is going into the catch and the error is comming like: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. thanks in advance, vishnu
vishnukamath wrote:
Im Using The Select Query to Get the data in to datatable
Post the code you are using
-
Hi, In my Asp.net WebApplication When Im Running A Select Query Im Getting A Error Like This: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I Tried A lot Of Ways For Solving This Problem..But No One worked. Thanks In Advance, Vishnu
Is the table very large, or are there a bunch of joins in the query? Are the tables being referenced properly indexed. If they aren't, doing so could substantially increase the performance of the query.
I wasn't, now I am, then I won't be anymore.
-
Is the table very large, or are there a bunch of joins in the query? Are the tables being referenced properly indexed. If they aren't, doing so could substantially increase the performance of the query.
I wasn't, now I am, then I won't be anymore.
I would use the MS-SQL Profiler to obtain statistics about the query you are trying to execute. Check the execution plan and verify that you are not doing lots of table (or index) scans. Your problem also sounds like you might be trying to retrieve too many records at once. How many records are expected to be returned ? Maybe you should be using a data reader. Just a few thoughts. good luck.
-
Hi, In my Asp.net WebApplication When Im Running A Select Query Im Getting A Error Like This: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I Tried A lot Of Ways For Solving This Problem..But No One worked. Thanks In Advance, Vishnu
-
Hi, In my Asp.net WebApplication When Im Running A Select Query Im Getting A Error Like This: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I Tried A lot Of Ways For Solving This Problem..But No One worked. Thanks In Advance, Vishnu
vishnukamath wrote:
I Tried A lot Of Ways For Solving This Problem
I don't think you might have tried. This is a simple problem having simple solution. SELECT statement inside your program could not be accomplished with the default connection time limit. so Try by increasing
connection timeout
inside your connection object. I bet it will work like a charm. Thanks, HirenRegards, Hiren. "We owe a lot to the Indians, who taught us how to count, without which no worthwhile scientific discovery could have been made." - Einstein Microsoft Dynamics CRM