Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. dataset.databind() very slow

dataset.databind() very slow

Scheduled Pinned Locked Moved ASP.NET
databasesql-serversysadminperformancequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    colin mcadam
    wrote on last edited by
    #1

    I have a web app which is gets data from an sql server. the code returns a data set which i bind to a datagrid, see code; private void Button2_Click(object sender, System.EventArgs e) { remote.helpdesk rem = new remote.helpdesk(); DataSet ds2 = new DataSet(); TextBox3.Text = DateTime.Now.ToLongTimeString(); ds2 = rem.runQuery("select * from problems"); TextBox4.Text = DateTime.Now.ToLongTimeString(); DataGrid2.DataSource = ds2; DataGrid2.DataBind(); } straight forward enough but if i try and return too many rows in the datagrid it takes AGES and the page times out. I would have thought the datagrid would be designed to work with many rows? Is there any way i can speed this up so the page loads quicker? Thanks Colin

    C 1 Reply Last reply
    0
    • C colin mcadam

      I have a web app which is gets data from an sql server. the code returns a data set which i bind to a datagrid, see code; private void Button2_Click(object sender, System.EventArgs e) { remote.helpdesk rem = new remote.helpdesk(); DataSet ds2 = new DataSet(); TextBox3.Text = DateTime.Now.ToLongTimeString(); ds2 = rem.runQuery("select * from problems"); TextBox4.Text = DateTime.Now.ToLongTimeString(); DataGrid2.DataSource = ds2; DataGrid2.DataBind(); } straight forward enough but if i try and return too many rows in the datagrid it takes AGES and the page times out. I would have thought the datagrid would be designed to work with many rows? Is there any way i can speed this up so the page loads quicker? Thanks Colin

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      colin mcadam wrote: straight forward enough but if i try and return too many rows in the datagrid it takes AGES and the page times out. How many rows are you adding? I've had upto 10,000 rows in a datagrid and it worked well (considering the quantity of data). Or, is it your database query that is taking a long time?


      Do you want to know more?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups