Fausto,
Your choices are to use the NOFILTER clause in the cursor to force the SQL-SELECT to open a separate table (not a filtered version of Table1) or to always use the "AGAIN" clause
USE Table1 again in 0 alias Table1
The USED() command checks for an ALIAS not a TABLE so if your cursor is actually a filtered table then USED('Table1') will be .F. but you still won't be able to USE it without the AGAIN clause.
Barbara
>Hi,
>
>I'm experiencing a strange behaviour with a SQL-SELECT command. When I perform
>SELECT fielda, fieldb, fieldc FROM table1 WHERE condition1
>a cursor with the results is created. If I issue
>USE IN 'table1'
>and then I ask to
>USE table1
>I get the 'File is in use' error message, as if table1 was opened (which no longer is since the USE IN command has closed it).
>
>What might the problem be here?
>
>TIA,