Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

CTDatabase.IsExclusive

Retrieves the status of the database exclusive flag.

Declaration

bool CTDatabase.IsExclusive();

Description

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

Return

Value

Symbolic Constant

Explanation

FALSE

NO

Database is shared.

TRUE

YES

Database is exclusive.

Example


// verify an exclusive logon and connect

CTSession hSession(CTSESSION_CTDB);

CTDatabase hDatabase(hSession);

hSession.SetSessionExclusive(true);

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

if (hSession.IsExclusive())

printf("Session is exclusive\n");

else

printf("Session is shared\n");

hDatabase.SetExclusive(true);

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