>In the command window, the SEEK() function finds a certain record. In the executable, it doesn't. I already checked, with the debugger:
>
>
That the same table is accessed.
>That the same index is used.
>That the seek expression is the same.
>That the table isn't filtered in either case.
>SET DELETED is ON in both cases.
>SET COLLATE is MACHINE in both cases.
>
>Are there any other methods to foul up the SEEK() function?
>
>TIA, Hilmar.
OK, I finally found the problem, but it took me several hours of debugging. There are at least two other ways to foul up the SEEK: 1) SET NEAR (this wasn't my problem), and actual changes to the data (this was my problem).
It turns out that in the program, I deleted several records, and issued TableUpdate() - but I carelessly forgot to issue TableRevert() when the TableUpdate() failed. (The idea was to delete records that didn't have child records in another table.)
Since I was seeking in the same alias, the records were temporarily invisible. When cancelling the program, apparently the records were reverted automatically, and were visible again!
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)