>>>>
>>>>Why can't you use a query with ORDER BY?
>>>
>>>I can. But the query with ORDER BY on the initial cursor will be of a different name. And this will lead to making a bunch of changes in the code. So I was trying to stay with the same cursor name to avoid making other changes.
>>>
>>>I don't know if you read what Naomi said, but she thinks that the initial ORDER BY should work.
>>>
>>>I will have to run some tests.
>>>
>>>Thank you for your help.
>>
>>The initial order by persists when you do SET ORDER TO on the cursor. Test it, it's easy <g>
>
>It does not seem to work for me.
>
>Here is what I did:
>
>I created a cursor using SQL Select with WHERE 1=0 and READWRITE and ORDER BY FLD1, FLD2
>
>Then I added (appended a bunch of records) each one with value in FLD1 in descending order. That is, e.g. "99", "88", "77".
>
>Then I browsed the cursor and it does not put the records in the ORDER BY FLD1 but rather in the order as I added the records.
>
>Do you see what I mean?
I see now. In my tests I created the cursor with select * from table into cursor curTest order by .. readwrite.
In your case the order would be the order of added records...
If it's not broken, fix it until it is.
My Blog