SQL_LockDatabase Function

Locks a database so threading operations will not interrupt.

If you are using a database Handle for both threading and non-threading, this MUST be called before doing any set of non-threading DB operations. Otherwise you risk corrupting the database driver's memory or network connection.

Leaving a lock on a database and then executing a threaded query results in a dead lock! Make sure to call SQL_UnlockDatabase()!

If the lock cannot be acquired, the main thread will pause until the threaded operation has concluded.

void SQL_LockDatabase(Handle database)


Handle database

A database Handle.


Invalid database Handle.