Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003

    Unanswered: Sort RecordSet once it's returned?

    Can I sort my ADODB.Recordset by a field once the recordset is already created or should I be doing this at the SQL SELECT level / point?
    Is there a sort option for the recordset?

  2. #2
    Join Date
    Jan 2005
    it's easier to sort it in SQL

    just add ORDER BY fieldname at the end with ASC (ascending) or DESC (descending) at the end. You can have multiple order by fields also, the non-primary fields are used when the primary fields are equal


    SELECT * FROM mytable ORDER BY myimportantcolumn, myimportantcolumn2

  3. #3
    Join Date
    Dec 2003
    After the RecordSet is created you cannot sort records in the RecordSet. But I think there is a way to sort them using ASP code. That may reduce the performance. Why don't you sort the records in the SQL statement?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts