Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Session Dictionary

The session dictionary is a collection of databases, and each record of the session dictionary file contains the information of a particular database. In general, just one session dictionary file exists, ctdbdict.fsd, located by default in the server directory (client/server development) or in the application directory (stand-alone application). The table below represents the general layout of a session dictionary file:

Session Dictionary Layout

Field

Type

Length

Description

TYPE

CT_INT4

4

Record type: 1-database 2-table 3-index

STATUS

CT_INT4

4

Record status: 0-status ok 1-reserved

NAME

CT_FSTRING

128

Name of database or table or index

LINK

CT_FSTRING

128

Name of table if record type is 3-index

LINKNBR

CT_INT4

4

Table UID if record type is 3-index

PATH

CT_FSTRING

256

Path of database dictionary, data or index

SUPEXT

CT_FSTRING

16

Super file extension (if super file is used)

DATEXT

CT_FSTRING

16

Data file extension (usually .DAT)

IDXEXT

CT_FSTRING

16

Index file extension (usually .IDX)

VERSION

CT_INT4

4

Record version: 0x00010000 (version 1.0)

COUNTER

CT_INT4

4

Deprecated.

UID

CT_INT4

4

UID for database or table or index

OWNER

CT_FSTRING

128

Name of owner - used by the c-treeSQL server

MIRROR_NAME

CT_FSTRING

128

Name of mirrored file.

MIRROR_PATH

CT_FSTRING

128

Path of mirrored file.

RESERVED

CT_ARRAY

3128

Reserved for future use

This information is included for general information on the session dictionary structure. c-treeDB has appropriate functions to retrieve any needed information from the session dictionary, such as the database UID or path.

A session dictionary file has several different record types:

  • Database records (the field Type set to 1) holds information about databases.

A special type four record which maintained the COUNTER field has been been deprecated as of FairCom DB V9.0.

TOCIndex