Some commands lock the file header for a millisecond or two. Try to open the table in a Try-catch block, something like
Do while .t.
try
USE (tcTable) AGAIN IN 0 ALIAS (lcAlias) SHARED ORDER TAG (tcTag)
catch
loop
endtry
exit
enddo
>Hi,
>
>I got the "File is in use" errors on a regular basis. What may be a reason for this?
>
>I got an error here, for example.
>
>USE (tcTable) AGAIN IN 0 ALIAS (lcAlias) SHARED ORDER TAG (tcTag)
>
>That table may be involved in havy processing by many users, but I'm trying to open it in shared mode, so why is the error?
>
>The application uses local views and the database is located on the server.
>
>Thanks.