0

I am populating a set of results in asp.net grid-view from a stored procedure. That stored procedure is very huge and taking some time to return the results. While executing that stored procedure its taking two minutes , but I am able to see the results in the SQL Server Editor. But in grid-view it is not loading and I am getting time out error.

Can any one please suggest me the solution?

Error Details:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Kevin Andrid
  • 1,963
  • 1
  • 15
  • 26

2 Answers2

0

As You have not post your source code, i can suggest you to have a look here,

Poor Performance with Sqlparameter

Timeout Expiry issues.<- Refer this answer

Apart from that, its always preferred to load the data you can see on the single page. Loading more then 200 records in a grid view is not preferable. It will obviously slow down your screen.

Load on demand is the approach you can look forward to load your grid view . Load On Demand GridView

Community
  • 1
  • 1
Teju MB
  • 1,333
  • 5
  • 20
  • 37
0

Thanks all for the solutions. Anyway I fixed this issue , by increasing command time out time. It works :)

Thanks Again.