How to sort the data from database? [Answered]RSS

1 reply

Last post Jan 04, 2018 02:35 AM by Yuk Ding

  • How to sort the data from database?

    Jan 03, 2018 01:51 PM|jimschan|LINK

    Hi,

    I have a test table in my database with four column Like name,old,sex and id. How could I read the table from my database and sort it based on specific column? I'm learning how to use ADO to sort and display the data in my database. Thanks in advance.

  • Re: How to sort the data from database?

    Jan 04, 2018 02:35 AM|Yuk Ding|LINK

    Hi jimschan,

    It should have nothing to do with classic asp but the sql query string. You only need to use the query string to sort the data when you were reading the data from the database. Like

    sql="SELECT Name, Old FROM mytable ORDER BY Old"
    rs.Open sql, conn

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.