>Dear all,
>
>Is there any other command for knowing that a table is being used by another user besides "USED" ?
>
>thank's
Knowing that is not easy. Even used() doesn't give enough info if it's used by you because it uses alias, not tablename. You might open tableA with alias myTable then used("tableA") returns .f. where used("myTable") returns .t.
It should be needed rarely to know, that FP didn't provide a command for it at all. Even select() returns the highest unused area but not lowest :) I wonder who needs the highest if we are using them starting from lowest (maybe just to check system capacity).
If what you want to do is to attempt exclusive usage then there are workarounds :
1) Try opening exclusive wrapped in an ON ERROR routine. But interestingly if already opened in shared mode by you in an area, you could reopen it in another area using AGAIN and EXCLUSIVE clauses. Then it's opened shared and doesn't give an error.
2) Try to open it lowlevel (fopen()). This is a safer way of knowing it. You cannot get a valid handle (cannot open) if it's in use by you or someone else in any mode.
Cetin