Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTDatabase::IsExclusive

Retrieves the status of the database exclusive flag.

Syntax

CTBOOL CTDatabase::IsExclusive() const;

Description

CTDatabase::IsExclusive() retrieves the status of the database exclusive flag.

Return

Value

Symbolic Constant

Explanation

0

NO

Database is shared.

1

YES

Database is exclusive.

Example


// verify an exclusive logon and connect

CTSession hSession(CTSESSION_CTDB);

CTDatabase hDatabase(hSession);


hSession.SetSessionExclusive(YES);

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

if (hSession.IsExclusive())

printf("Session is exclusive\n");

else

printf("Session is shared\n");


hDatabase.SetExclusive(YES);

hDatabase.Connect("MyData");

if (hDatabase.IsExclusive())

printf("Database is exclusive\n");

else

printf("Database is shared\n");

See Also

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

TOCIndex