ADO Sort Property
Most of the time required the data in record set to be sorted in specific order. We can achieve this by using ‘Sort’ Property of record set.
The Sort property sets or returns a string value that specifies the field names in the Recordset to sort on. Each field name must be separated by a comma. To choose the sort order, you can specify ASC (ascending order), or DESC (descending order) after the field name. Default is ASC.
E.g.
1. rs.Sort="City_Name,Company_Name"
2. rs.Sort="City_Name Desc,Company_Name"
Thursday, September 23, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment