USE bookings IN (SELECT("Bookings")) ALIAS muh USE bookings IN (SELECT("muh")) EXCLUSIVEBut this would generally never occur in my code by design. But then again, I rarely need to open a table exclusive in a client application. As in the original example, I would have done a DELETE ALL in shared mode, and then create a method that recycles those deleted (RECALL) record when needed, or else INSERT if none are found.
>USE bookings IN (SELECT("Bookings")) ALIAS muh >USE bookings IN (SELECT("Bookings")) EXCLUSIVE >*boom >>
>USE bookings IN (SELECT("Bookings")) >USE bookings IN (SELECT("Bookings")) AGAIN ALIAS muh >USE bookings IN (SELECT("Bookings")) EXCLUSIVE >*boom >>
>SELECT SELECT("Bookings") >USE bookings EXCLUSIVE >>
>>USE bookings IN (SELECT("Bookings")) EXCLUSIVE >>SELECT Bookings >>>>So if the table is already open in another work area, then it will be reopened in the same work area.
>>>SET SAFETY OFF >>>SET EXCLUSIVE on >>>USE bookings IN 0 EXCLUSIVE &&I have tried it with and without the exclusive clause. Makes no difference. >>>DELETE ALL >>>PACK >>>IF ISEXCLUSIVE( ) &&Just to check if there is exclusivity. returns .f. each time - no matter what I change around in the code. >>> MESSAGEBOX('Table opened exclusive') >>>ELSE >>> MESSAGEBOX('Not opened exclusively') >>>ENDIF >>>SET EXCLUSIVE OFF >>>SET SAFETY ON >>>