Resorting an Ado recordset without reopening it.
On Fri, 13 Dec 2002 14:54:42 -0500, "Robert Dufour"
Quote:
>This is the problem. I got two recordset, that I merge by looping through
>them generally speaking this way
>Do while not Rs1.EOF
> Pseudocode, look in RS 2 see if a record exists with an Rs1 value (it's
>an hour and minutes value. If It exists do nothng if it does not
>exist create a new Rs2 record with the required other blank values
>and that hour minute value
> Rs1.movenext
>Loop
>When I've gone through this loop I have a recordset in which the new
>required blank records inserted at the end, so it's not in ascending hour
>minute order.
>How do I take that same recordset and reorder it in ascending hour minute
>value before I show it in a datagrid?
>Thanks for any help.
>Bob
You could set Sort property of ADO recordset to order the records.
The recordset must be opened using "adUseClient" to be able to use the
Sort property.
HTH,
Nair