CTDatabase.SetExclusive
Sets or clears the database exclusive flag.
Declaration
void CDatabase.SetExclusive(bool flag);
Description
CTDatabase.SetExclusive() sets or clears the database exclusive flag. If a database exclusive flag is set, only one connection will be allowed on this database. Set the database exclusive flag after allocating the database handle, and before performing a connection. Setting the database exclusive flag after a database is connected will not have any effect during the current connection. flag will set or clear the database exclusive flag.
Return
Void
Example
// performs an exclusive logon and connect
CTSession hSession(CTSESSION_CTDB);
CTDatabase hDatabase(hSession);
hSession.SetExclusive(true);
hSession.Logon("FAIRCOMS", "ADMIN", "ADMIN");
hDatabase.SetExclusive(true);
hDatabase.Connect("MyData");
See Also
CTSession.SetExclusive(), CTSession.IsExclusive(), CTDatabase.IsExclusive()