Hi!
Assume you have ID field named "Parent_ID" and character field called "cName". Using "SET KEY TO RANGE ..." command you can do folowing:
- create indexes in table for sorting like "padl(Parent_ID,12,'0') + padr(cName,100)"
- when master record changes, instead of Link Master use "SET KEY TO RANGE padl(m.nParent_ID,12,'0') + space(100), padl(m.nParent_ID+1,12,'0') + replicate(chr(0),100)"
While index covers both ID and cName, you will limit displaying of child record to only thous that belong to current master record using the range for keys.
Hope this helps.
>Have a grid located on a form which as it's datasource has child records. The original devloper used the dreaded LinkMaster property to bind the FK in the child to the PK in the parent. We need to sort the grid by a column other than the FK value. Setting ChildOrder in the grid properties sheet does nothing, and manually re-ordering the grid loses the relationship between child/parent. We have tried unbinding the grid and manually populating by a parameterized view and by cursor, and the speed difference is tremendous. How do you re-sort a grid which is bound, using the Linkmaster property? Child table has 7,000,000 records.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.