Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbGetPathPrefix

Returns the client-side path prefix.

DECLARATION

pTEXT ctdbGetPathPrefix(CTHANDLE hSession);

DESCRIPTION

A path prefix can be set anytime after the session handle is allocated. If a path prefix is set before a session logon, the new path prefix will affect the location of the session dictionary file. If a path prefix is set after a session logon, but before a database connect, then the path prefix affects only the database dictionary and any tables that are manipulated during that session.

A path prefix can be removed at any time by setting a NULL value for the path prefix. You can use ctdbGetPathPrefix() to check if a path prefix is set or not. If ctdbGetPathPrefix() returns NULL, then no path prefix is set.

RETURN

Value

Symbolic Constant

Explanation

0

NO_ERROR

No error occurred.

NULL

NULl

No path prefix was set.

See Appendix A for a complete listing of valid c-tree Plus error values.

EXAMPLE

/* get the current path prefix */

YourPathPrefix = ctdbGetPathPrefix(AnyHandle);

if (CurrentPathPrefix == NULL)

printf("ctdbGetPathPrefix() returned no path.\n");

SEE ALSO

ctdbSetPathPrefix()

TOCIndex