Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort field values with GetRows function

Status
Not open for further replies.

nwlanding

Programmer
Dec 4, 2002
1
US
For a series of 12 fields returned in a GetRows funtion I need to rank each of the field values in descending order for each record and perform specific updates based on the results. I thought about creating an array out of the field values and iterating through each value and ranking them but I thought I'd check to see if there's an easier method that I'm not aware of.

Thanks...
 
Assuming you have a static ADO recordset with a client side cursor. Instead of using the GetRows function, disconnect the recordset and use the ADO sort. You could sort on the first column either desc or asc then handle that column and then repeat for the other columns. I believe this would be easier to follow, require less code, and still be quite efficient.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top