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. how to get first 5 records from a dataset having 100 records

how to get first 5 records from a dataset having 100 records

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 3 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.
  • R Offline
    R Offline
    romanchita
    wrote on last edited by
    #1

    I hav 100 records in a dataset.how can i fetch the first 5 records from the dataset

    M E 2 Replies Last reply
    0
    • R romanchita

      I hav 100 records in a dataset.how can i fetch the first 5 records from the dataset

      M Offline
      M Offline
      Matglas
      wrote on last edited by
      #2

      I know that when you have a sql statement MySql support Limit 5. Then you get 5 records. But i dont know if all the database applications support it. Hope it helps.

      1 Reply Last reply
      0
      • R romanchita

        I hav 100 records in a dataset.how can i fetch the first 5 records from the dataset

        E Offline
        E Offline
        ednrgc
        wrote on last edited by
        #3

        select top 5 fieldname1, ....

        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