The name of a file.
Optional. Default = .F. .T. = If the table you are testing is a shadow table, and you want to be sure that no other user has opened the master table (either directly, or indirectly, through the use of a shadow table). .F. = Alpha Anywhere will check only that no other user has the shadow table file in use
Returns true if the named table/library is in use (does exclusive open test).
The TABLE.IN_USE() method returns .T. if Filename is currently in use in any session. This function is useful for determining if Alpha Anywhere can get exclusive use of a file before attempting to perform an operation on a file that requires exclusive access.
This PC has the customer shadow table open. The example shows that no other users have the customer table open.
? table.in_use("customer.dbf", .t.) = .F.
This script tests if it can get exclusive access to invoice_items. If so, it compacts the table.
file = "c:\program files\a5v5\invoice\invoice_items.dbf" test = table.in_use(file) if (.not. test) then table.compact(file) else ui_msg_box("Error","File is in use.") end if