Mike Yearwood
Toronto, Ontario, Canada
IMO, LOCATE examines the TAG that corresponds to any existing filter statement and builds a bitmap. SET KEY works like SEEK which has to hit the index tag a smaller number of times to find the first record.
This is why SET KEY can improve performance used instead of a filter on a grid.
If you use GO TOP in this case, you may find it works faster and doesn't C005.
>HI,
>
>I've a large table (100K+ records that takes up about 75MB) that is giving me fits (C000000005 errors) when the follow is done:
>
>SELECT lsealt
>SET ORDER TO TAG lseacctnum
>SET KEY TO m.lseacctnum && variable assigned a value
>LOCATE
>
>Usually the LOCATE causes the problem. But to make matters more confusing is that I don't get this when I use VFP6. Only when running the code in VFP7.
>
>I've recreated indexes, copied the records to a Temp table and renamed it back. Nothing works. I don't want to compile under VFP6.
>
>Anyone know about any quirks with SET KEY TO ?
>
>Thanks
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only