AndrewMozley
Programmer
There is a table with an index tag MyTag1, key is MyBatch.
MyTaG1 is just a regular index, although it happens that Mybatch had been unique within the table. So a program could say :
. . . and swiftly retrieve the desired record.
It now happens that Thisbatch may not be unique in the table. So to retrieve a particular record, the code now says :
. . .
LOCATE FOR Mybatch = Thisbatch .AND. MyCode = Thiscode
I had rather hoped that the VFP search engine would optimise this, and swiftly retrieve the desired record. But the code runs slowly, so I suspect this is not the case.
I can modify the earlier code (SEEK . . ) and loop round till I get the desired record. But is there a way of getting the VFP engine to do the work for me, using the index?
Thanks.
MyTaG1 is just a regular index, although it happens that Mybatch had been unique within the table. So a program could say :
Code:
SELECT MyDBF
SET ORDER TO TAG MyTag1
SEEK Thisbatch
. . . and swiftly retrieve the desired record.
It now happens that Thisbatch may not be unique in the table. So to retrieve a particular record, the code now says :
. . .
LOCATE FOR Mybatch = Thisbatch .AND. MyCode = Thiscode
I had rather hoped that the VFP search engine would optimise this, and swiftly retrieve the desired record. But the code runs slowly, so I suspect this is not the case.
I can modify the earlier code (SEEK . . ) and loop round till I get the desired record. But is there a way of getting the VFP engine to do the work for me, using the index?
Thanks.