Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTDatabase::SetExclusive

Sets or clears the database exclusive flag.

Declaration

void CDatabase::SetExclusive(CTBOOL flag);

Description

flag will set or clear the database exclusive flag.

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, but before performing a connect. Setting the database exclusive flag after a database is connected will not have any effect during the current connection.

Return

void

Example


// perform an exclusive logon and connect

CTSession hSession(CTSESSION_CTDB);

CTDatabase hDatabase(hSession);


hSession.SetExclusive(YES);

hSession.Logon("FAIRCOMS", "ADMIN", "ADMIN");

hDatabase.SetExclusive(YES);

hDatabase.Connect("MyData");

See Also

CTSession::SetExclusive(), CTSession::IsExclusive(), CTDatabase::IsExclusive()

TOCIndex