locked
Displaying huge data in datatable: RRS feed

  • Question

  • Hi All,

    I've around 7000 records coming from data base. I want to display these data in UI (in tabular form). As the data is huge, I'm getting timeout error. Can anybody please suggest what is the best way to get the data in UI? (with the example) Kindly waiting for your response.

    Thanks, Santosh

    • Moved by Bob Beauchemin Wednesday, August 13, 2014 1:45 AM Moved to a more appropriate forum for best response
    Tuesday, August 12, 2014 6:18 AM

Answers

All replies

  • What are you doing with 7000 records? You can enable pagination and get only those records required for the viewing page.

    Refer: http://blog.sqlauthority.com/2013/04/14/sql-server-tricks-for-row-offset-and-paging-in-various-versions-of-sql-server/

    • Marked as answer by Fred Bao Friday, August 22, 2014 6:57 AM
    Tuesday, August 12, 2014 6:35 AM
  • If you get the error "Timeout expired", this not per se because the result set is 7000 rows; the timeout elapses because client has not seen a single row in 30 seconds, or whatever you have set the timeout to.

    If your sole problem is the timeout, increase the timeout. This is a property on the command object.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Marked as answer by Fred Bao Friday, August 22, 2014 6:57 AM
    Tuesday, August 12, 2014 7:23 AM
  • I would agree with respect to paging. Here is the ADO.NET option:

    Paging Through a Query Result


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by Fred Bao Friday, August 22, 2014 6:57 AM
    Wednesday, August 13, 2014 3:54 PM
  • Hi

    Change the QueryTimeout  time in Ur code if not set then u can set that in code .

    ---Plesae mark as answer if u find it helpful

    Vivek

    Monday, August 18, 2014 7:20 AM