>The line that is failing is pretty basic: Select Request Request is a free table that is open in the current data environment. No error is generated, but the work area for the request table does not become the active work area.
>
>And then it gets more bizarre. I tried this bit of code,
>
> IF UPPER(RIGHT(DBF(),11)) == UPPER("REQUEST.DBF")
> SET STEP ON
> xx = 1000
> endif
>
>The debugger stops on the line after the SET STEP ON. But then in the watch Window DBF() = "C:\FOX\C_FIRSTOP.DBF" and UPPER(RIGHT(DBF(),11)) == UPPER("REQUEST.DBF") = .f. If that is the case how did control get inside the IF block?
>
>
>Crazy, huh? This is old code that is working in production that I have made changes to in other methods. Request has to be the currently selected work area as there is code referencing it all over the place that isn't fully qualified with the table name - and some commands like locate that don't have an IN clause. I have tried manually recompiling the class, no luck. Rebuilding the class would be a nightmare at best.
>
>Any thoughts, ideas and comments would be appreciated.
>
>Lou
Lou,
Do you have timer running that may be changing work area?
See also FAQ #15515
If it's not broken, fix it until it is.
My Blog