Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTSession::SetCurrentNodeName

Sets the client node name.

Declaration

void CTSession::SetCurrentNodeName(String* NodeName)

Description

When monitoring c-tree Server attached users, well written c-treeDB client applications should "register" their workstation (node) name using the standard c-tree SETNODE() (SetNodeName()) function call.

CTSession::SetCurrentNodeName() sets a client-side node name. NodeName is a string specifying the node name. The specified node name appears in the ctadmn utility under the option for "list clients". CTSession::SetCurrentNodeName() can only be called after a successful logon.

This functionality is available only with the c-tree Server. A call to CTSession::SetCurrentNodeName() on non-server environment will always return CTDBRET_OK and the node name is ignored.

Return

void

Example


CTSession->Logon("FAIRCOMS", "ADMIN", "ADMIN");

CTSession->SetCurrentNodeName("MyNode1");

See Also

CTIndex::SetDefault(), CTRecord::BuildTargetKey()

TOCIndex