Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Freeing Locks Associated with a Table

You can free only the locks associated with a table by calling the CTTable.UnlockTable() method. Only the locks held for records of the table are released, and all other record locks are kept.

// free locks for a table

try

{

ATable.UnlockTable();

}

catch (CTException err)

{

Console.Write("Unlock table failed with error {0}\n", err.GetErrorCode());

}

If freeing locks associated with a table inside an active transaction, the locks of updated records will only be actually freed when the transaction terminates.

TOCIndex