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. Arrange database Column entries by ascending order.

Arrange database Column entries by ascending order.

Scheduled Pinned Locked Moved Visual Basic
databasehelpquestion
4 Posts 4 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.
  • J Offline
    J Offline
    jeshra279
    wrote on last edited by
    #1

    Hi All, I have a SQL database column "ID", in which I added one by one entries as 2,5,6,1,8... randomely. I want to arrange these entries in Ascending order so that in datagridview it get displayed in order 1,2,3,4... like this. Can someone help me on this? Thanks.

    D L V 3 Replies Last reply
    0
    • J jeshra279

      Hi All, I have a SQL database column "ID", in which I added one by one entries as 2,5,6,1,8... randomely. I want to arrange these entries in Ascending order so that in datagridview it get displayed in order 1,2,3,4... like this. Can someone help me on this? Thanks.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Use order by in the query/stored procedure you are using to retrieve the data.

      50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

      1 Reply Last reply
      0
      • J jeshra279

        Hi All, I have a SQL database column "ID", in which I added one by one entries as 2,5,6,1,8... randomely. I want to arrange these entries in Ascending order so that in datagridview it get displayed in order 1,2,3,4... like this. Can someone help me on this? Thanks.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        This is not the appropriate forum for your question. Choosing the correct forum helps you get more answers (and better answers).

        1 Reply Last reply
        0
        • J jeshra279

          Hi All, I have a SQL database column "ID", in which I added one by one entries as 2,5,6,1,8... randomely. I want to arrange these entries in Ascending order so that in datagridview it get displayed in order 1,2,3,4... like this. Can someone help me on this? Thanks.

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          If you have a SQL Question Post here General Database http://www.codeproject.com/Forums/1725/General-Database.aspx[^] in the Query that you use to display the Grid with , add the Following line of SQl

          Order by ID ASC

          Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          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