<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqtext">
<Function File="../../src/liblqtext/smalldb.c">
<Name>LQT_ObtainWriteAccess</Name>
<Class>Database/Database, Database/Files
<Purpose>
Grants write access to the current database.
This is called automatically by LQT_OpenDatabase if appropriate.
<Returns>
<LIST>
<LI>zero on success
<LI>-1 on error or failure
</LIST>
<Notes>
Write access may on some systems be exclusive, so that no other
process can open the database, neither for reading nor for writing.
You should not rely on this, however; on some systems, multiple
clients may succeed in writing, and will corrupt the database.
<Errors>
A corrupt database may cause a fatal or E_BUG error.
<SeeAlso>
LQT_ObtainReadOnlyAccess
LQT_OpenDatabase
</Function>
<Decl>
API int
LQT_ObtainWriteAccess(db)
    t_LQTEXT_Database *db;
</Decl>
</Entry>
