TurboDB VCL Component Library

TTdbTable.Exclusive

TTdbTable

Previous  Top  Next

Enables an application to gain sole access to a TurboDB table.

Delphi syntax:

property Exclusive: Boolean;

C++ syntax:

__property bool Exclusive = {read=FExclusive, write=SetExclusive, nodefault};

Description

Use Exclusive to prevent other applications from accessing a TurboDB  table while it is open in this application. Before opening the table, set Exclusive to True. A table must be closed before changing the Exclusive property.

When Exclusive is True, then when the application successfully opens the table, no other application can access it. If the table for which the application has requested exclusive access is already in use by another application, an exception is raised. To handle such exceptions, wrap the code that opens the table in a try..except block.

Do not set Exclusive to True at design time if you also set the Active property to True at design time. In this case an exception is raised at start-up because the table is already in use by the IDE.

 

Warning

Exclusive access to a table within a singlefile database is not possible and will raise an exception when trying.

Open the whole database in exclusive mode instead.