<!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_ObtainReadOnlyAccess</Name>
<Class>Database/Database, Database/Files
<Purpose>
Obtains read-only access to the current database.
This is called automatically by LQT_OpenDatabase if appropriate.
If the database was previously open for writing, it should be
closed first with LQT_CloseDatabase or LQT_SyncDatabase.
<Returns>
<LIST>
<LI>zero on success</LI>
<LI>-1 on failure or error</LI>
</LIST>
<Errors>
A corrupt database may cause a fatal or E_BUG error.
<SeeAlso>
LQT_OpenDatabase
LQT_ObtainWriteAccess
LQT_OpenKeyValueDatabase
LQT_CloseDatabase
</Function>
<Decl>
API int
LQT_ObtainReadOnlyAccess(db)
    t_LQTEXT_Database *db;
</Decl>
</Entry>
