TurboDB VCL Component Library

Read-Only Tables and Databases

See also

Previous  Top  Next

You can set a database and/or a table to read-only (ReadOnly property) to prevent any modifying access to it. Even if a database table is opened read-only, TurboDB has to create a net-file for it, because otherwise a second application could open the database in read-write mode and cause an access conflict.

If the database is stored in a location where no write access is possible (write-protected directory, DVD etc.) you must open the database exclusively and read-only. In this case TurboDB will not try to create net and mov files.

In the rare case, where two applications need concurrent access to the database in a read-only location, you can call SetSharedReadOnly(True) instead of setting the Exclusive property. In this mode, TurboDB does not create net and mov files but opens the database in a shared mode. By calling this method, the application must guarantee that no other application will modify the database as TurboDB by itself cannot detect modifications in this mode.