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. General Programming
  3. C#
  4. DataBinding + DataTable as DataSource - very strange behaviour

DataBinding + DataTable as DataSource - very strange behaviour

Scheduled Pinned Locked Moved C#
help
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.
  • E Offline
    E Offline
    ElCachubrey
    wrote on last edited by
    #1

    Hi all There is a subtle bug what i can't resolve. Please help. snippet 1 this.bindingSource.DataSource = this.dataTable; this.bindingSource.DataSource = null; this.bindingSource.Dispose(); /* Fill method read data by using data reader for this table. When this table contains many records (about 150000) this operation (Fill) consume about 1 minute. */ this.dataTable.Fill(); snippet 2 /* this.bindingSource.DataSource = this.dataTable; this.bindingSource.DataSource = null; this.bindingSource.Dispose(); */ Now i comment all code above, and supposingly this don't have any matter as such as i just return all to initiali state. BUT Now this operation (Fill) consume about 30 seconds. */ this.dataTable.Fill(); Any idea please. 30 more seconds very critical for me. THANK.

    R 1 Reply Last reply
    0
    • E ElCachubrey

      Hi all There is a subtle bug what i can't resolve. Please help. snippet 1 this.bindingSource.DataSource = this.dataTable; this.bindingSource.DataSource = null; this.bindingSource.Dispose(); /* Fill method read data by using data reader for this table. When this table contains many records (about 150000) this operation (Fill) consume about 1 minute. */ this.dataTable.Fill(); snippet 2 /* this.bindingSource.DataSource = this.dataTable; this.bindingSource.DataSource = null; this.bindingSource.Dispose(); */ Now i comment all code above, and supposingly this don't have any matter as such as i just return all to initiali state. BUT Now this operation (Fill) consume about 30 seconds. */ this.dataTable.Fill(); Any idea please. 30 more seconds very critical for me. THANK.

      R Offline
      R Offline
      Ravenet
      wrote on last edited by
      #2

      Hi Guys I think 30 sec is enough time. but not desired. So i think if we are put a thread to do the file operatoion and give high leve thread.may be this help to you reduce the time consume. thanks

      Cheers RRave MCTS,MCPD

      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