Whatever line is causing the error, right before that write:
IF USED("foo")
USE IN foo
ENDIF
>I am using Cursor for my reports. For example Select * from Mytable into cursor XYZ and after that I am using reports to preview it.
>
>The problem.
>
>The first time when I generate the reoprt, It runs fine but the second time it gives error as file is in use (XYZ cursor).
>
>Now, first where should i write USE in (XYZ) and second My progeram requires that there may be N number of Cursors with different name but the report generated will be the same. So I am looking for a command that could tell me which is the active table and than after I will execute the command USE IN ...
>
>In short,
>
>I need to know (1) How to determine the active table/cursor Name
>(2) Where should i write use in .. somewhere in the report ?