>Thank you, I thought of that before as well, but my navigation grid allows user to click on a header in order to change the order tag on the table for search enhancement. I would have to create a new cursor each time you change the order. Honestly that doesn’t happen very often, but some tables are large and I was concerned with speed degradation.
>
>I will try it again.
You can create indexes on ReadWrite cursors, it usually does not take long.
SELECT * FROM MyTable INTO CURSOR MyCursor READWRITE
LOCAL lnFields, lnField, lcFieldName
lnFields = FCOUNT(THIS.AliasName)
FOR lnField = 1 TO lnFields
TRY
lcFieldName = FIELD(lnField)
INDEX ON &lcFieldName TAG &lcFieldName ADDITIVE
CATCH TO loException
ENDTRY
ENDFOR
Christian Isberner
Software Consultant