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. Visual Basic
  4. DataSets - Size Issue

DataSets - Size Issue

Scheduled Pinned Locked Moved Visual Basic
databasehelp
5 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.
  • N Offline
    N Offline
    nlindley7
    wrote on last edited by
    #1

    I've been trying to find the best way to load data from SQL into a DataGridView. Obviously I could just load it into a DataSet with a SqlDataAdapter and set the dataSource of the DGV to the DataSet, but i'm having issues because there are 120,000 records that need to be loaded, and this takes quite a while to load DataSet from the adapter. I guess this isn't an issue with the DGV, but loading the data into the dataset. Nathan Lindley

    K 1 Reply Last reply
    0
    • N nlindley7

      I've been trying to find the best way to load data from SQL into a DataGridView. Obviously I could just load it into a DataSet with a SqlDataAdapter and set the dataSource of the DGV to the DataSet, but i'm having issues because there are 120,000 records that need to be loaded, and this takes quite a while to load DataSet from the adapter. I guess this isn't an issue with the DGV, but loading the data into the dataset. Nathan Lindley

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      Maybe you should only grab the number of records that you are going to display in the grid at a time?

      N 1 Reply Last reply
      0
      • K Kschuler

        Maybe you should only grab the number of records that you are going to display in the grid at a time?

        N Offline
        N Offline
        nlindley7
        wrote on last edited by
        #3

        Well i was going to have them be able to scroll through the list instead of forcing them to search for a specific set of records, but that seems to be the only way. Thanks Nathan Lindley

        K 1 Reply Last reply
        0
        • N nlindley7

          Well i was going to have them be able to scroll through the list instead of forcing them to search for a specific set of records, but that seems to be the only way. Thanks Nathan Lindley

          K Offline
          K Offline
          Kschuler
          wrote on last edited by
          #4

          I guess my only other suggestions for making it faster are to make sure that you are selecting ONLY the columns that you absolutely need in the grid, and to do everything you can (in terms of formatting) in the SQL statement so that you do not have to loop through the records to format after you have retrieved them. Good Luck.

          N 1 Reply Last reply
          0
          • K Kschuler

            I guess my only other suggestions for making it faster are to make sure that you are selecting ONLY the columns that you absolutely need in the grid, and to do everything you can (in terms of formatting) in the SQL statement so that you do not have to loop through the records to format after you have retrieved them. Good Luck.

            N Offline
            N Offline
            nlindley7
            wrote on last edited by
            #5

            Agree. Thanks Again. Nathan Lindley

            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